Let's assume we got the following variables:
var1 = 2
var2 = 8
var3 = 24
I want to do the following, just as a loop:
array A[3]
A[1] = var1
A[2] = var2
A[3] = var3
what i tried but did not work:
array A[3]
do for [i=1:3] {
A[i] = var[i]
}
I wanted to add the index from i to the variable so that it'll be A[1] = var1 etc. It says the variable var would be undefined.
Round brackets like var(i) don't work either.
Is there even a possibility to do so? Any hints are appreciated.