Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constants vs Locals
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00269906
Message ID:
00270404
Vues:
29
>>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.

Hey, that's the same convention I came up with last night < s > Also, I noticed some other MS header constants don't use caps, either, so, you're not exactly breaking any standardization by doing this...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform