Hello forum:
I've been beating my head against the wall too long. Guess I'd better ask the experts.
I am attempting to use a mvt:while to read an array with 3 elements:
<mvt:comment> create array </mvt:comment>
<mvt:assign name="g.ratesfld" value="l.ratesfld" />
<mvt:assign name="g.arraysize" value="miva_array_elements( g.ratesfld )" />
<mvt:assign name="g.idx" value="1" />
<mvt:while expr="g.idx LE g.arraysize">
&mvt:global:ratesfld[g.idx];<br>
<mvt:assign name="g.idx" value="g.idx + 1 " />
</mvt:while>
If I code the bolded line with the variable g.idx as the index: &mvt:global:ratesfld[g.idx]; it fails with message saying that the index must be a positive integer. This code also fails: &mvt:global:ratesfld[&mvt:global:idx;];<br>
If I code this line this way, it works: &mvt:global:ratesfld[1];<br>
What gives?
Cheers, Larry
I've been beating my head against the wall too long. Guess I'd better ask the experts.
I am attempting to use a mvt:while to read an array with 3 elements:
<mvt:comment> create array </mvt:comment>
<mvt:assign name="g.ratesfld" value="l.ratesfld" />
<mvt:assign name="g.arraysize" value="miva_array_elements( g.ratesfld )" />
<mvt:assign name="g.idx" value="1" />
<mvt:while expr="g.idx LE g.arraysize">
&mvt:global:ratesfld[g.idx];<br>
<mvt:assign name="g.idx" value="g.idx + 1 " />
</mvt:while>
If I code the bolded line with the variable g.idx as the index: &mvt:global:ratesfld[g.idx]; it fails with message saying that the index must be a positive integer. This code also fails: &mvt:global:ratesfld[&mvt:global:idx;];<br>
If I code this line this way, it works: &mvt:global:ratesfld[1];<br>
What gives?
Cheers, Larry
Comment