Variable names in variables
Posted: Sat Sep 17, 2011 3:23 am
I know I've asked this before, but can't recall the answer.
If I have a local variable that contains a string which is the name of another variable, how do I get at the contents of the inner variable?
put 5 into variable1
put "variable1" into variable2
I want to get "5" from variable2. I tried value(variable2), but that of course gives me "variable1", unless it is a system global preceded with a dollar sign, as in:
put "$APPDATA" into variable2
value(variable2) returns "C:\Users\Walt\AppData\Roaming".
Thanks. I know this is a "Well dur" question, I'm just drawing a blank.
If I have a local variable that contains a string which is the name of another variable, how do I get at the contents of the inner variable?
put 5 into variable1
put "variable1" into variable2
I want to get "5" from variable2. I tried value(variable2), but that of course gives me "variable1", unless it is a system global preceded with a dollar sign, as in:
put "$APPDATA" into variable2
value(variable2) returns "C:\Users\Walt\AppData\Roaming".
Thanks. I know this is a "Well dur" question, I'm just drawing a blank.