Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do the Mdots have it?- Attn Ken Levy
Message
From
26/04/2002 13:14:17
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00649450
Message ID:
00649704
Views:
10
Hi Jim,

When I first read the original thread, I was curious, so I ran several tests with similar results as yours. It really doesn't seem to make that much difference in performance in any way that I have tested it, with even up to 10,000,000 interations. With VFP6 SP5, using M. did run slightly slower, but such a slight difference is negligible. Performance is influenced by so many other factors, such as poor design and redundant/inefficient programming, processor speed, OS, etc. such that the way that you specify variables doesn't really have much of an impact.

I use m. to reference variables any place that they CAN be referenced in this way, notable exception would be when using a variable in macro expansion. I even use hungarian notation for variable names but still use m. (strange, huh?) I reference fields as aliasname.fieldname even though it is not really necessary and use comments out the wazoo, because if I have to look at code some weeks, months or years later, I don't want to spend a lot of time trying to figure out exactly what I was trying to accomplish. (No I'm not getting paid by the number of keystrokes;)

IMHO, this is primarily a matter of programming style and personal preference. This is no different that using the optional key words that can be used in some commands. As long as VFP doesn't complain, and it does not significantly impact performance, what's the big deal? I doubt that it really makes that much difference in performance for the benefit, IMO, to help make the code more readable and maintainable for myself and any others having to work on it in the future.

Elmer
Previous
Reply
Map
View

Click here to load this message in the networking platform