Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Include files and constants?
Message
De
24/07/1997 18:30:15
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00041459
Message ID:
00041557
Vues:
31
Yes, you need to include the file in each form. I suspect a typo error in your program, since you say you already included the file.

Basically, if you know C/C++, it's easy to know when and where to include a header file, because it's like in C #define in .h file. IE: the defined constant is in fact only a macrosubstitution at compile time.

And avoid having many constants in header files since this is extremly heavy for the compiler and it slows down seriously the compile time.

Vlad

>I have an include file with some constants. In particular, MSG_ERROR is defined in this include file. I have a form class. In the form class I include that include file. I create a form based on the formclass. Some of the code in the form is "WAIT WINDOW MSG_ERROR". When this code is encountered I get, "Variable 'MSG_ERROR' is not found." I figured I forgot to compile everything. So, I did that. Same error. Perhaps the include file needs to be in the form also? I did that and recompiled everything. Same error. This is rather odd and I'm stymied on what to do next.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform