Initializing variables

cowhead cowhead at
Sun Mar 10 11:50:01 EST 2002

 When you have a long list of variables, it might be easier to try an
array instead.
For example:

on mouseUp
global myVar
repeat with i = 1 to 1000
put 0 into myVar[i]
end repeat
end mouseUp

So, instead of calling your variables x,y,z can simply call
myVar[1],myVar[2], etc

good luck,

mark in Japan

Jim wrote:

I have a list of variables, say "x,y,z"
> I would like to set each of these equal to zero. If
> I were to use the
> following:
> put "x,y,z" into tList
> repeat with i = 1 to 3
> put 0 into item i of tList
> end repeat

More information about the use-livecode mailing list