Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EVALUATE('THISFORM.lAccessed3 = .T.') not working????
Message
From
19/10/1999 18:03:32
 
 
To
19/10/1999 07:51:32
Kenneth Downs
Secure Data Software, Inc.
New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00277939
Message ID:
00278521
Views:
17
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
Map
View

Click here to load this message in the networking platform