you'd better go with a list. It's easier and will have far better
performance. I don't think you can use the do command since, if I'm not
mistaken, you cannot initialize variables using 'do' (you can set them
if they have been initialized before..).. Often when you think you need
something like the 'eval' command in flash, you're better of solving the
problem another way in director.
but using lists.. it's even simpler.
mylist = []
repeat with i = 1 to n
mylist.add(something)
end repeat
getting the data back out..
mylist[someindex]
simple and affective..
J.
-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] George S. Roland
Verzonden: donderdag 26 mei 2005 16:04
Aan: Lingo-L
Onderwerp: <lingo-l> Using repeat loops to assign values to variables
I am sure there must be a simple way to do this, but I'm having
trouble figuring out what it is.
Say I have numbered variables:
myVariable1, myVariable2, myVariable3, etc.
Is there a way to initialize them with a loop such as:
repeat with i = 1 to 3
set myVariable(i) = something
end repeat
All suggestions appreciated!
Thanks,
George
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]).
Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]