Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable Naming
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00315006
Message ID:
00315551
Vues:
24
>>>lcname is a local character
>>>pcname will never exist in my program, but it would be a public character
>>
>>I think this notation is more standard
>>
>>l local
>>p private
>>g global
>>t parameter
>
>>I find that confusing. I would rather see
>>lnDaysOfRain = Weather.DaysOfRain
>>than
>>DaysOfRain = Weather.DaysOfRain
>
>One other point here: With contemporary coding, it's becoming more common to lose the 'l' for Local, since there aren't any Publics or Privates to distinguish in most code - if there are, you can use a prefix for them as you describe, and for parameters. But I discontinued the redundant Local 'l' a year ago or so, it makes the code a lot more pleasant, I think, without it. I see more of this all the time in reading published code...

I agree with you on that one, Bruce. I only use the scope for a parameter (t), and otherwise only if a variable needs further clarification. I do use the variable type for variables, but not for properties or for fields.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform