Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why define constants
Message
From
25/10/2006 10:03:54
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164235
Message ID:
01164352
Views:
14
>Jim,
>
>I see two problems with your alternative: 1) memvar consumption and 2) runtime execution speed.

Interesting... I expected your main criticism to be repeated code if used in more than 1 place.
Personally, in these days of large RAM I have little concern for memvar consumption.
And my suspicion is that execution speed would be little different between the two because I assume that any "constants" actually end up in (what we called in mainframe days) the "literal pool", resulting in similar execution as using a memvar. And, again, today's processors are so fast that I concentrate speed issues primarily on external data access/update and not on internal memory fetching.

cheers

>
>>I would too. But I don't see a problem with:
wdUndefined     = 9999999
>>wdToggle       = 9999998
>>wdForward      = 1073741823
>>wdBackward     =  -1073741823
>>wdAutoPosition = 0
>>wdFirst        = 1
>>wdCreatorCode  =  1297307460
>>You touch on a problem with .h files. And they also have to be explicitly 'set' (managed). I just don't see a whole lot of value with #DEFINE.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform