for
The for
loop iterates over a range of numeric values of type integer.
<@ for 1 to 5 @>
<p>@{ :i }</p>
<@ end @>
Within the code block of the loop, the current index is represented by the runtime variable :i
. Instead of numbers it also possible to use variables to define the range.
<@ for @{ start } to @{ end } @>
<p>@{ :i }</p>
<@ end @>