An <MvFOR> loop can be explicitly halted using the <MvFORSTOP> tag to exit the loop. Execution jumps to the code following the closing </MvFOR> tag.
ExampleThis examples loops from 1 to 100 incrementing the INDEX by 1. The <MvFORCONTINUE> tag is used to skip processing on every third loop. Example:
<MvFOR INDEX = "l.pos" FIRST = "{ 1 }" NEXT = "{ l.pos + 1 }" LAST = "{ 100 }">
<MvCOMMENT> Skip the code every third loop </MvCOMMENT>
<MvIF EXPR="{ l.pos MOD 3 }">
<MvFORCONTINUE>
</MvIF>
... process the other items...
</MvFOR>
|