Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why define constants
Message
 
 
To
25/10/2006 10:55:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164235
Message ID:
01164460
Views:
10
Jim,

>Sure. But the default is 16,384 and the maximum is 65,000,

The default has not always been that high... it used to be only 1024

>and the error message is pretty clear when it's the problem. I think I'd know well before it was a problem that I had a problem looming and I suspect that re-design might be the answer over using #DEFINEs.

but when the error doesn't happen until the end user tries it the first time..

>*IF* a 'constant" in VFP ends up in the equivalent of OS Assembler's "literal pool", then what is the difference? I suspcet that VFP does use the equivalent of a "literal pool" for "constants". Of course that's conjecture and could be all wet.

Because of VFP's interpretive nature, an assignment statement always takes CPU at runtime, a #define does not. It's sub-microsecond with current CPUs, but it's still user CPU cycles that need not be consumed.

And this has gotten to the point that neither you nor I will convince the other to alter their opinions on #define so it's just not worth the time continuing this subthread.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform