Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Naming conventions for custom methods?
Message
From
18/11/2008 18:05:12
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
18/11/2008 15:48:58
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01362229
Message ID:
01362702
Views:
28
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform