Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable Naming conventions.....
Message
De
13/05/1999 23:16:19
 
 
À
13/05/1999 19:22:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00218631
Message ID:
00218853
Vues:
24
Hi Peter ---

I use a bastardized form of standard notation, but close to the Codebook standards. For memory variables, I rarely use scope indicators unless the scope is unusual. For example, variables are scoped by default to local so why use a local indicator unless the var is not local? I do use type indicators, though, for example: dToday, cName, nAmount.

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

For object properties, I use mixed case and just call 'em as they are. For example, oApp.CurrentUser.

Non-visual objects are always preceded by "o".

Visual objects are always preceded by a three-letter identifier as to type (almost exactly as in Codebook), i.e., txt=Textbox,cbo=Combobox,ebo=EditBox...etc.

I'm a bit wishy-washy on views. If I'm running a single-tier system with nothing but local views, I'll use vue as a prefix more often than not. If multi-tiered with local and remote I'll use lvw for local and rvw for remote; I'll also use con for connections.

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.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform