Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro substitution
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00305094
Message ID:
00305526
Vues:
22
>>>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
>
>Ed,
>
>Nothing as long as xCode never has any leading spaces.

If it did, then the EVAL() above would fail, too. Thanks for pointing out this as a possible source of trouble with macro expansion, especially in name resolution - embedded spaces get treated as separators!
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform