Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why cannot use & with Thisform.SomeProperty
Message
 
 
To
06/05/2009 14:37:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01397844
Message ID:
01398258
Views:
70
>> >>Greg,
>> >>
>> >>Sorry to disappoint you, but in your case you should have been using name expression instead.
>> >>
>> >>E.g.
>> >>
>> >>replace (lcFiledName) with lcValue in (lcAlias) && this is much better and safer syntax
>> >
>> >Actually this is very unsafe syntax. It should be:
>> >
>> replace (m.lcFieldName) with m.lcValue in (m.lcAlias) && this is much better and safer syntax
>> >to be safe. However, majority use the unsafe way. My .02 cents.
>> >
>> >Cetin
>>
>> Great point, Cetin. I used to always use m. notation, but later had to drop this habit to adhere to other programmers' style.
>
>I generally use m. whenever there can be an ambiguity of whether or not it's a variable or field name. In cases where it can only be a variable I don't use the prefix. For example:
>
>i = m.i + 1
>
>I had adopted this convention from having to deal with one of the quirks of QuickSilver (a dBASE compiler) back in the DOS days. Had I used the "m." prefix on the left-hand-side of the assignment statement, it would've created a variable with "m." as part of the name -- meaning that I'd have to use "m.m.i" to access the contents of that variable.
>
>Ugh... just had nasty flashback of dealing with dBASE III+ code using "pseudoarrays" based around macro expansions... (combined with 10-character limit on identifiers and maximum number of variables it could get ugly. At least back in those days applications were relatively simple)

But dBASE III was way cool compared to dBASE II ;-) 10 work areas compared to just Primary and Secondary, and that was just the tip of the iceberg.

Setting aside snarky comments, I do remember both versions from the pioneer days. At the time I was a mainframe programmer and it seemed miraculous that you could do all this yourself on a computer you could control, without having to battle your way through forms, your boss, system programmers, and other defenders of the big machine in the locked room. (Right next to the room with boxes and boxes and boxes of greenbar paper. The punch card readers and rows of tape drives were right in the locked room). And actually do something useful! My first app tracked and scored a football pool -- you can't get much more useful than that. It was beyond cool, it was transcendent, regardless of how primitive it seems today.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform