Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding conventions
Message
De
02/01/2004 02:42:01
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
01/01/2004 14:55:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00863303
Message ID:
00863382
Vues:
9
>My question is about naming variables. For numeric variables, the second letter of the variable name (the type) is usually an "n". Now, if the variable will contain only integer data, you might also use the letter "i" for the variable type. Does anybody do this, or recommend this?
>
>I have been using "n" for several years, whether the variable contains integers, or real numbers.

I'm not doing it and wouldn't do. If some day I decide to change an int to a double it'd mean to change var names too (convention wise). An int is a field type and in the same manner c for chars and m for memo would be ugly.
Honestly I never liked the convention. I use the convention for 2 reasons :
-To match the UT community in my codes posted
-To prevent name clash with PEM namings.
Otherwise actually I find it nonsense to name say 'FirstName' as 'cFirstName' or 'ShipDate' as 'dShipDate'. For the latter dShipped would seem to be a shortcut but I don't like it, Shipped might be a date or boolean and I prefer ShipDate, Shipped instead vs dShipped,lShipped. IOW I try to include type clue directly within the name rather than prefix.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform