General information
Category:
Coding, syntax & commands
Kenneth:
Thanks for the reply.
Yes, I have heard that macro substitution is slower. In this case, I just couldn't find a solution - outside of Jorge's suggestion to use the "&".
Your solution works!
STORE .T. TO (m) ... the key was the ()'s around the "m"!!!
Both solutions have eliminated a lot of DO CASES for me.
Thanks for all the help.
Regards,
Mal
>Malcom,
>
>Generally you want to avoid the macro substitution, as in &m, because it is very slow compared to name substitution. This becomes especially important in loops.
>
>Try something like this:
>
>MyVar = "Thisform.lAccessed" + ALLT(MyFormNumber)
>
>Assuming MyFormNumber is '3', then ? m yields:
>
>Thisform.lAccessed3
>
>You can then to name substitutions:
>
>STORE .t. TO (MyVar)
>
>>Hi All.
>>
>>Actually, this is what I'm trying to do.
>>
>>m = ALLTRIM('lAccessed' + '3')
>>*need to do this becuase the '3' changes depending on what the form number it's executed from (in this case it's form #3).
>>
>>m = 'THISFORM.' + m + ' = .T.'
>>
>>?m .... && shows THISFORM.lAccessed3 = .T.
>>
>>EVALUATE('m') does not change the lAccess3 to .T.
>>
>>What am I missing? It works for procedures and functions;
>>i.e. if m equaled THISFORM.DoChanges(3).
>>
>>As always, thank you for your help.
>>
>>Mal
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only