passing in a variable name
Posted: Fri May 06, 2016 3:48 pm
Hi
I have variables in my code
H1[mcount]
H2[mcount]
H3[mcount]
the 1,2,3 is set using a counter
How do I programmatically pass the name of H1, H2 and H3 as say a variable myvar
so my code would appear
myvar[mcount] where myvar is set to H1 , H2 or H3
I have tried
put 1 into Fcount
put H & Fcount into myvar
when I use
answer myvar[mcount] it return the right value but if I use
answer H1[mcount] it returns empty
thx
I have variables in my code
H1[mcount]
H2[mcount]
H3[mcount]
the 1,2,3 is set using a counter
How do I programmatically pass the name of H1, H2 and H3 as say a variable myvar
so my code would appear
myvar[mcount] where myvar is set to H1 , H2 or H3
I have tried
put 1 into Fcount
put H & Fcount into myvar
when I use
answer myvar[mcount] it return the right value but if I use
answer H1[mcount] it returns empty
thx