Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable Naming conventions.....
Message
De
14/05/1999 01:16:32
 
 
À
13/05/1999 23:16:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00218631
Message ID:
00218888
Vues:
24
>Hi Peter ---
>
>I do use type indicators, though, for example: dToday, cName, nAmount.

I have a lot of date variables and fields in my reservation system: dStart, dIn, dOut, dClean, dEnd, etc. The little "d" prefix actually saves me a lot of typing because I don't have to use variables like: StartDate, InDate, OutDate, etc.


>Mixed case on vars and PEMS, lower on system files, tables, fields, upper case for keywords and constants or THIS,THISFORM.....

This is where I part company with the vast majority of FoxPro programmers. I use lower-case for key words, mixed case for fields, variables and PEMS (no underscores), and all caps for TABLE names. Here's the way I look at it: I KNOW how to spell the key words, a quick glance is enough to tell me what the word is. Which TABLE I'm referring to is critical, though, so I want that information to STAND OUT.



>Last but not least, I try to name controls with a prefix of type and the name = to the controlsource name. For example, txtLastName for a TextBox control that
>maps to personnel.lastname.

I like this suggestion. I'm probably doing this most of the time. If I did it all of the time then I could count on it when I see the control name.

Peter
Peter Robinson ** Rodes Design ** Virginia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform