Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Naming conventions again........
Message
De
28/08/1999 07:59:27
Walter Meester
HoogkarspelPays-Bas
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00258085
Message ID:
00258788
Vues:
24
George,

>I think the above is less readable than

>IF NOT userHasNoDeletePermission()
> * Stuff to delete
>ENDIF
>RETURN llresult

>and that it can make debugging harder depending on the circumstances.

Wel it depends... If there is a lot of coding between the IF and ENDIF you have to scroll your code to make sure there is nothing after the endif when reading and analyzing the code.

Another drawback is that it requires another indent of tabs (or spaces) to format your code, which *can* have a negative impact on readability.

>I'd be more likely to name the function UserHasDeletePermission()

You're right, I was only making an example. In practice I don't have procs named like that.

Walter,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform