any way to access function..n?
Posted: Sun Jul 16, 2017 3:01 pm
I happen to have a situation where it would be very convinient to be using "for n=1 to x" to perform what I am doing, however, i have basically double trouble.
part of the line is to access func1, func2, func3.
And another is var1, var2, var3 type of thing.
so what i would in effect need is:
For var1, var2, i could see a possibility for using g["var"..n] to access it, but in this case they happen to be local variables, i guess local variables are not stored in global variables list at any point?
So any possiblity to access these without putting them first in list?
for i could have:
and then access it:
But is this the only way i can do it?
part of the line is to access func1, func2, func3.
And another is var1, var2, var3 type of thing.
so what i would in effect need is:
Code: Select all
for n=1 to 3
myfunction(var..n, func..n)
nextSo any possiblity to access these without putting them first in list?
for i could have:
Code: Select all
myfunclist = {func1, func2, func3}
myvarlist = {var1, var2, var3}
Code: Select all
for n=1 to 3
myfunction(myvarlist[n], myfunclist[n]
next n