Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Headings in Menus
Message
 
 
À
07/04/2001 11:15:38
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00492587
Message ID:
00493291
Vues:
15
>Hi Nadya, Hiten,
>Just to let you know, there's some disagreement as to which rules are good. I'm one who loves VFP because it can be written so clearly. The only reason for prefacing local variable with an "l" is tradition. I think we would all agree that variables with one or two exceptions should all be local and methods should be short (two scrolls at most--if larger than that you are doing too much). One could just as well argue to preface variables with "v" to show they are variables. The type is only desired if you can't name something that denotes the type. FirstName would be...could be... what else other than character? Your IsFound is a good variable name that can only be Logical. If it's otherwise, prefaces aren't your most pressing problem.

Thanks, Charlie. I think, I'm a traditionalist :)

>
>>>Hi
>>>
>>>I wonder if you could guide me to some rules that u follow while coding.
>>>
>>>Thanx a zillion
>>
>>Hi Hiten,
>>
>>Basically, my rules are:
>>
>>1) Write clean well-commented code.
>>2) Use MS recommended notation, e.g. for local variables:
>> lcFirstName
>> lnI - counter
>> llIsFound
>> loValid - object, etc.
>> For parameters I use t as a first letter. Also I prefix variables with m. to distinguish them from table fields, e.g.
>>
  if m.llIsFound
>>      ** Piece of code
>>  endif
>>Ok, there are other rules, I follow, but some of them just personal preferences.
>>
>> Check also a document in Documents section here: "VFP: Do and Don'ts"
>>
>> Hope this helps.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform