Goodness, how about using a list instead? It'll give you 100 (or 1000's)
of variable "slots".
To take your example directly, it'd be:
on doit
myList =[]
repeat with i=1 to 100
myList[i] =0
end repeat
end
There's also a shortcut, if you know your way around, which is:
on doit
myList =[]
setAt(myList, 100, 0)
end
But either way, you now have a list with 100 slots initialized to 0.
- Tab
At 03:54 AM 11/16/00 +0000, Jason & Merav wrote:
>Hi,
>
>I want create 100 variables called 'var1', 'var2' .... 'var100'.
>
>my handler currently reads :
>
>on doit
> repeat with i = 1 to 100
> "var"&i = 0
> end repeat
>end
>
>but Lingo doesn't like the fact that my code is trying to set a string ...
>not a variable. Is there a way to do this!!!!
>
>Thanks you,
>
>Jason.
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/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/LUJ/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!]