Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Naming conventions for custom methods?
Message
De
17/11/2008 07:27:18
 
 
À
16/11/2008 22:55:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01362229
Message ID:
01362266
Vues:
15
>I follow the common practice of use type prefixes when naming custom Properties in classes and forms like this:
>
>
>lAddMode
>cName
>oTextBox
>nSomeValue
>etc.
>
>
>Now then, is it also common to use those same prefixes when naming custom Methods that return known types.
>
>for instance:
>
>
>lUsesVCR()
> return Vartype(this.oPageFrame)='O'
>
No, it's not common. It's more common to use some kind of word that signals something about the return value, so your example would be UsesVCR() or HasVCR(). The word "Is" is often the first word in a method name for one that returns a logical.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform