Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visibility of defined constants
Message
 
To
13/12/2006 14:11:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01177331
Message ID:
01177336
Views:
10
>I have an application that is launched with STARTUP.prg.
>STARTUP.prg contains a line #INCLUDE constants.h.
>constants.h contains a line #DEFINE CRLF chr(13) + chr(10)
>
>My understanding is that the constants thus defined should be available throughout the application.
>
>The application is running in _screen with a custom menu. The menu calls a routine contained in a .prg program file. References to CRLF within the program file result in an error that says the constant CRLF is undefined. Apparently the visibility chain is broken when control passes through a menu. Why would this be so? Is there a generally accepted way to overcome this limitation?
>
>Thanks

Nope,
#define is valid ONLY for current program section), Current program, current method. If you put all #define constants in external header file you could include that file for whole form, class etc. you could also made it default include file (but this will be valid only form newly created files).
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform