Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Constants vs Locals
Message
From
28/09/1999 23:18:47
 
 
To
28/09/1999 22:49:52
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00269906
Message ID:
00270337
Views:
30
>>>...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.
>
>I use an alternate "standard" for contant names, I preceed them with an "h" and a type letter, eg. hnPi
>
>In my mind the difference between a constant for Pi and a local variable for Pi is the scope. A constant is accessible in many places beyond the immediate function or method. So we should use a scope indicator to show that.
>
>And it does have a type which should be revealed just as we do with a local variable.
>
>I like "h" because of the association with "header".
>
>Just my two cents.
>
>Peter Robinson

That convention looks as good as any and makes sense.
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