Variable names stored as strings can only be used in the following IDL Functions:
EXECUTE
SCOPE_VARFETCH
Either of these functions may provide the functionality you are looking for. EXECUTE takes a string argument like:
executeStatement = "Frame1 = " + strtrim(myCurrentFrame, 2)
success = EXECUTE(executeStatement)
The above would give you the ability to set a variable named Frame1 in the current scope to a new value. Maybe the below syntax will interest you even more:
targetFrame = SCOPE_VARFETCH('Frame1')
That would allow you to access the data stored by variable 'Frame1' in the current scope. SCOPE_VARFETCH also has a LEVEL keyword that allows programs to access variables that are in scopes "above" the routine in current focus.
James Jones
|