D
Don Lancaster
I need to progrmatically do this inside a loop
this.fh03.value = fixFloat (Harms[1], numPoints) ;
with the numbers changing per an index.
If I try
curHvals = "03" ; // (derived from index to provide leading zero)
( "this.fh" +curHvals + ".value" ) = fixFloat(Harms[ii],numPoints)
I get a [ Cannot assign string to 'string "this.fh03.value" ' error. ]
The right side of the equation works just fine elsewhere.
As does this.fh03.value elsewhere.
eval (...) does not work as it looks up the previous fh03 value rather
than replacing it with a new one.
What is the correct way to programatically loop calculated values with
fancy names?
Is there a command for string to named variable conversion?
--
Many thanks,
Don Lancaster voice phone: (928)428-4073
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml email: (e-mail address removed)
Please visit my GURU's LAIR web site at http://www.tinaja.com
this.fh03.value = fixFloat (Harms[1], numPoints) ;
with the numbers changing per an index.
If I try
curHvals = "03" ; // (derived from index to provide leading zero)
( "this.fh" +curHvals + ".value" ) = fixFloat(Harms[ii],numPoints)
I get a [ Cannot assign string to 'string "this.fh03.value" ' error. ]
The right side of the equation works just fine elsewhere.
As does this.fh03.value elsewhere.
eval (...) does not work as it looks up the previous fh03 value rather
than replacing it with a new one.
What is the correct way to programatically loop calculated values with
fancy names?
Is there a command for string to named variable conversion?
--
Many thanks,
Don Lancaster voice phone: (928)428-4073
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml email: (e-mail address removed)
Please visit my GURU's LAIR web site at http://www.tinaja.com