This question is hard to explain
Posted: Sun Apr 12, 2009 3:18 am
ok I have a program i am working on in which the end user will be creating arrays. Each time they make a new one the name will be incremented.
e.g. tMainArray1, tMainArray2, tMainArray3 etc. The problem I am having, is in declaring them global. I could create a long list of globals and hope the end user doesn't end up creating more then i planned for, but that is messy. so, what I have been playing with is this:
(tMainArrayInc is the variable i use to increment the array names) Obviously this isn't working or i wouldn't be posting. I hope though that it is enough to explain what I am trying to do. What can I do that will work?
e.g. tMainArray1, tMainArray2, tMainArray3 etc. The problem I am having, is in declaring them global. I could create a long list of globals and hope the end user doesn't end up creating more then i planned for, but that is messy. so, what I have been playing with is this:
Code: Select all
global tMainArrayInc
repeat with x = 1 to the value of tMainArrayInc
do "global tMainArray" & the value of x
end repeat