Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Naming conventions for custom methods?
Message
De
18/11/2008 18:05:12
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
18/11/2008 15:48:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01362229
Message ID:
01362702
Vues:
30
>I'm not saying you can't do it that way. I prefer to declare them up top when needed. Variables needed just inside a loop or if get declared at the top, inside.

You made it clear - "most of the people..."; no confusion there. Was just thinking aloud as to why I don't think that's a healthy practice. If you are sure the variable will be so very local, then fine - I do that sometimes myself. But as a general habit, spreading declarations all over the place looks sloppy to me. Looks almost like my desk.

>>IMO, one neat thing about the variable declarations is that they're grouped on top, just like they once were in single-pass compilers, so when you need one you know where to look. You may scatter them throughout the code, but that decreases readability, IMO, and then you at least have to search up and down. Well, the more you read the code, the better you know it...

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform