Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why define constants
Message
From
26/10/2006 02:26:19
Walter Meester
HoogkarspelNetherlands
 
 
To
25/10/2006 13:55:22
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164235
Message ID:
01164638
Views:
12
Alexandre,

>>>I see two problems with your alternative: 1) memvar consumption and 2) runtime execution speed.
>>
>>1. Actually it might bite you as well. E.g:
>>
#DEFINE MYSTRING "This is a very long string of a few hundred characters long ....."
>>
>>IF you use this instead of a variable, it ends up as many times you use the contant, consuming more memory than when using variables.
>
>I'm sorry Walter but you are 100% wrong on this one.
>The #DEFINE gets replaced when you compile your app and not at run time so in runtime.

Sorry, but you did not get the point. Whether it is in the variable pool or in memory as part of the executable does not really matter. It still will consume memory. In other words, your executable will be larger.

Walter,
Previous
Reply
Map
View

Click here to load this message in the networking platform