Andrews,
#include happens at compile-time. Think of it this way, when VFP compiles the source code it does a search and replace in the source for any constants and replaces them with the values you have in #define. This also happens on a per file basis, so if you want mensajes.h to be #include in your entire app, you have to include it in every form / class / code module.
You can set a default .h file in VFP setup, and you can also add it to forms / classes using the menu.
See the following thread for a very complete discussion for how it works.
Forum: Visual FoxPro Category: Coding, syntax & commands Title: MESSAGEBOX Thread #
365597 Message #
365597 >These are the first lines of my main program.
>
>#include mensajes.h
>public pladmon, plvtas, plcpras, plbcos, plnom, plcontab, plalm, pcmodulo, pcusuario
>store .f. to pladmon, plvtas, plcpras, plbcos, plnom, plcontab, plalm
>
>But when I use the debugger to chechk out the program it skip the first line (#include mensajes.h) and I can not understand why...?
The #include is not an executable line. It only applies when the source is compiled.
>TIA
>Note: Is there any article about the use of file .h?
Roi
'MCP' Visual FoxPro
In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!