Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indirect use of variables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00004081
Message ID:
00004152
Vues:
32
>>you shouldn't have to evaluate this...
>>STORE variablecontainingname TO myvar should work.
>
>But what I think he is talking about is STORing the contents of the variable referred to in variablecontainingname TO myvar.
>
>So for example:
>
>var1= "john" &&/ referenced variable
>vcn= "var1" &&/ this is variablecontainingname
>STORE EVAL(vcn) TO var2
>? var2
>
>Try it. I just did and it works (using FPW 2.6a).
>STORE (vcn) TO var2 &&/ this does not work, var2 then will contain "var1" instead of its contents.
>
>HTH

if that's the case, then use eval(). my only question would be why store a variable name in another variable? there has to be an easier way...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform