RE: GETFILE() Returns Empty String in Some Cases

Author: Ken Dibble

Posted: 2017-08-01 at 09:00:03

>I agree with reasoning, but I have a slightly different methodology

I actually have my own methodology; I just failed to follow it. I

personally find type abbreviations to be difficult to read and

interpret quickly. For generic variables I usually just prefix "the",

ie. thefile, thefolder, thename, etc. I never use "the" for a table

or cursor field, so this ordinarily prevents the kind of problem I

experienced yesterday.

Unfortunately, I had copied some old one-off code for this project in

order to try to save some time. I need to remember that a lack of

rigor will always eventually bite me.

>Personally I am not a fan of the "M." prefix and find it unnecessary.

A member of the VFP Team (I can't remember his name; he was the guy

who "took out the slow parts" from various subsystems for VFP 8 and

9) wrote a blog article explaining that without the M. prefix, the

system MUST compare every variable referenced to every field in the

current work area every time the variable is accessed to determine

whether the variable is a field name. He said that if the current

work area contains a large number of fields, and the same variable is

used over a large number of iterations in a tight loop, using the M.

prefix makes a considerable difference in speed. He showed test

results to demonstrate this.

I do a LOT of array iteration. So I began using the M. prefix for

variables inside high-iteration tight loops. I noticed a slight speed increase.

However, I find the M. prefix ugly and distracting. I used it

yesterday as a quick fix to demonstrate what the problem was. I will

probably eventually rename the variable.

Ken

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/AC.81.20123.36980895@cdptpa-omsmta02

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2017 Ken Dibble