Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding Standards
Message
De
09/07/1998 19:38:09
 
 
À
09/07/1998 18:48:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00115272
Message ID:
00115958
Vues:
16
>Funny, I always put the operator at the end of the previous line. But I think you're right for arithmetic operators.
>
>Still, I find it more clear if I put the logical operators at the end of line, like in:
>
>
>if (a = b) and ;
>   (a > 0)
>   Some code here
>endif
>
>or a better example:
>
>if ((a = b) and ;
>    (a > 0)) or ;
>   (b < 0)
>   Some code here
>endif
>
>
>IMO, it's easier to verify the parentheses and it makes more clear which are the operators used by each operator.
>
>Another "rule": only one condition by line.
>
>Vlad


Well, standards are all a matter of preference actually. There is a well known VFP author/developer/third party developer whose commenting & coding style I really can't stand. It is soooooooo hard for me to read. I end up reformatting it all.

As for the AND/OR, for me it is easier to pick up the stuff at the beginning of the line.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform