Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Constants vs Locals
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00269906
Message ID:
00270168
Views:
33
>>>Hi George - Let me use Jim's PI example...does it really matter whether you use a local or a #define for the PI value? I've always used locals or properties for such things, but am wondering if it's worth moving to constants.
>>
>>Bruce,
>>
>>The #DEFINE will be faster.
>
>That's what I've seen here, and I don't doubt it. I'm just wondering if it's worth actually using, though. Probably the performance difference is not great, since there are a limited number of cases when one uses locals that one doesn't need to change the value. And they kind of give a more "cluttered" look to the code. So I'm in conflict about it right now :)

It's a convention that constants be entered in all uppercase, but not necessary. You can use mixed or lower case if you want. That may help with the cluttered look.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform