>>
>>LOCAL ;
>> lcCmd
>>
>>m.lcCmd = "m.gnTest = 1"
>>
>>&lcCmd
>>
>>&m.lcCmd
>>
>>m.&lcCmd
>>
>>Is the last version the "correct" way to do this if you want the benefits of mDotting?
>
>When a macro is expanded, the interpreter
always and
only looks for memory variables, so the name is never ambiguous. Furthermore, during macro expansion, the dot acts as a name terminator, so issuing &m.lcCmd will try to expand a variable named "m".
>
>
>CLEAR
>
>CREATE CURSOR aCursor (m varchar(50))
>
>INSERT INTO aCursor (m) VALUES ('? "whatever"')
>
>? m
>
>LOCAL m
>LOCAL x
>
>m = '? "something"'
>x = '? m.'
>
>SELECT aCursor
>
>* expands to ? "something"
>&m.
>
>* expands to ? "something"m, and raises an error
>&m.m
>
>* expands to ? m.m
>&x.m
>
Thanks, the first sentence of your reply was what I needed (and didn't previously know). I've tested to my satisfaction that it's true :)
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up