Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to declare constants
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Best way to declare constants
Miscellaneous
Thread ID:
00654311
Message ID:
00654311
Views:
48
Hi All!

What would be the best way to declare constants in an application wherein it will be available and used throughout the application's activities? Would declaring it as such in a main prg:
#DEFINE MY_CONSTANT = SomeValueHere
be fine, or creating properties in the main form:
THISFORM.MyConstant = SomeValueHere
be much better? The latter part I am hesitant to follow since I am thinking about the application's scalability once I need to add more constants in the application. I don't want to compile again an EXE (if I followed creating properties in a form for constants) when I decide to add more constants for my app. My main methods and procedures are stored in a DLL which I call through CREATEOBJECT() so if ever I do decide to add more constants for use in my app, eventually the other thing I need to update and compile will just be my DLL. An INCLUDE file also comes to mind but I'd like to know which is really better for what I plan to do. Thanks in advanced.
Next
Reply
Map
View

Click here to load this message in the networking platform