Indirect variable reference

Howard Bornstein bornstein at designeq.com
Wed Jun 11 02:49:00 EDT 2003


Is there a way to reference a variable through another variable in 
Transcript?

IOW, I'd like to do something like this:

Repeat with i = 1 to 5
  put "List"&i into theList
  put i into value(theList)
end repeat

The idea is that I construct 5 variables, named list1, list2, list3, 
list4, and list5 in the variable theList. Then I put a value in each of 
these variables through the referencing variable (theList). 

The Value function is sort of what I have in mind (it first evaluates the 
expression) but, of course, it doesn't work in this fashion. Is there 
another way to do this (am I missing something obvious) or is this not 
possible in Transcript?

TIA,

Howard Bornstein
____________________
D E S I G N  E Q
www.designeq.com



More information about the use-livecode mailing list