Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution
Message
From
14/04/1998 16:32:48
Raul Davila
Davila Programming Services
Toa Alta, Puerto Rico
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00090513
Message ID:
00091919
Views:
20
>Hi Raul,
>
>To expand on Carlo's answer: &control..name
>
>The reason you need 2 periods: VFP has to know where to stop macro exapansion. So, the first period stops the exapansion and the second separates the object from the member.

Hi John:

Actually the issue was not with objects but with variables.
var_value = 5
v1 = 'var_'
v2 = 'value'
output = &v1.&v2

Doing some speed tests the following is the best sollution (almost half the time to complete):
var_value = 5
v1 = 'var_'
v2 = 'value'
output = EVAL(v1 + v2)

Of course those are generic examples and is not the way I'm appliying it.
Since the speed of EVAL() is about twice the speed of using &, is there a way
of doing the following using EVAL()?

var_value = 5
var_name = 'var_value'
&var_name = 6 && var_value is now 6

I don't see a way of using EVAL() to accomplish that, but I might be missing something.

TIA
R. Davila
DBA / Network Administrator
Administracion de Fomento Comercial
Gobierno de Puerto Rico

Still waiting for FoxPro for LINUX
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform