Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution
Message
From
17/12/1999 16:34:28
 
 
To
17/12/1999 16:29:58
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00305094
Message ID:
00305488
Views:
24
>>>Hi Erik,
>>>
>>>>cFieldName = "CodeList.Code" + xCode
>>>>uValue = EVAL(cFieldName)
>>>
>>>And with an eval() you don't need to define the variable, unlike macro expansion:
>>>
>>>uValue = EVAL("CodeList.Code" + xCode)
>>
>>Mike, while I like EVAL() as a much better solution, what's wrong with:
>>
>>uValue = CodeList.Code&xCode
>
>Anyway isn't it clearer to use EVAL than macro expansion. And the doc says that EVAL is faster...


I don't disagree - but the line of code I posted is legal, and accomplishes the task without the need for the intervening memvar. I rarely advocate macro expansions, but Mike's syntactic argument was not correct. I did state up front that, IMO, EVAL() is a better solution.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform