I have to create a string or variable which contains the name of some array and its index.
Then I need to use that var as the name for that array, but all I can is print the name of the array and index insead of its content.
This is some part as example:
- Code: Select all
#
# show the 5 properties chosen
#
for ( var i = 0 ; i < 5 ; i+=1 ) {
a="PrpArr"~Curr~"["~i~"]";
print (a);
};
To make it a little more clear... I do buildup the name of the array : PrpArr which should become then PrpArrX[] ... PrpArrY[]
The X and the Y represent the PrpArr which runs from 0 to many... set by the var Curr.
And its index should be made in the loop, from 0 to 4, set by the var i.
( later on this has to be used as a variable property, to be used in <property-prop> )
Then I can put it into var a and print it, and it shows perfect, PrpArr6[0] , but How to get the content its pointing to ?
Say the content is "one" .... "Five", then it should print :
one
two
three
four
five
As variable prop I am done right now, but I would like to check it at the console before....
Understand my problem ? Any help is appreciated. I could not figure it out.