I have a few arrays with like names.
ArrayTop[]
ArrayLeft[]
ArrayRight[]
ArrayWidth[]
I am trying to set the name dynamically in a function and then set value.
I have tried many ways of dynamically picking the right array but have not come up with a solution.
function setarray(a,b,c){
eval(Array+a+[b])=c
}
setarray('Top',5,100)
In this example i am trying to set.
ArrayTop[5]=100
See Question&Answers more detail:os