Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why define constants
Message
From
25/10/2006 10:54:37
 
 
To
25/10/2006 10:45:22
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164235
Message ID:
01164391
Views:
8
>>>Jim I shouldn't need to tell you that's completetly diferent,
>>>The #DEFINE will be on a single file easy to maintain while the variable would have to be all over the place unless u create it as public and we don't want that do we?
>>>take care.
>>
>>How many routines do YOU have in your app that checks for a disk in a drive??
>
>I thought this intere conversation wasn't cause 1 routine, was cause of #DEFINE versus Variables.

Alexandre, it is no attack. :)

The point I tried to make is that a variable will do as well, and in my opinion even better, if it is a text/value that is used only in one place. The example Jim Nelson reflected upon is a clear example of a text that is used in one routine rather than in many. If that text would occur in many routines, then the developer should reconsider the modularity of his code, rather than the variables-versus-constants debate.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform