Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why define constants
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164235
Message ID:
01164237
Views:
14
>Could someone educate me as to why it is standard practice to define constants with a variable name
>rather than to just use the constant in the code?
>
>IE, why is:
>
>#define MY_CONSTANT "My constant"
>? MY_CONSTANT
>
>better than
>
>? "My constant"
>
>
>I understand that it may make it easier to change the value of the constant if the need arises during
>design, but if the constant is only used in one place in the application is there still an advantage?

How about this:
#define AVOGADRO 6.0221415 × 10^23
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform