Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why define constants
Message
From
25/10/2006 11:05:44
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164235
Message ID:
01164399
Views:
12
>>>>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.

You're not nit-picking over the choice of message example, are you. That's not the point; it just happened to be the first example to come to my head, rather than spend half an hour thinking up a "real-life" example.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform