====== <#for> ====== The For tag starts a control loop, which is executed a finite number of times. The Variable is set to the result of the 1st Expression. If the result is less than or equal to the result of the 2nd Expression (when to is specified), then the Statement is executed. Variable is then incremented by 1 and the process is repeated until the variable value exceeds the 2nd expression value. For downto, the variable value is checked as being greater than or equal to the 2nd expression, and its value is decremented at the loop end. ==== Parameters ==== ^ Name ^ Mandatory ^ Description ^ | var | Yes | Variable name | | from | Yes | 1rt value of variable "name" | | to | Yes ((parameter **to** or **downto** are mandatory)) | Prefixes an incremental for loop target value | | downto | Yes ((parameter **to** or **downto** are mandatory)) | Prefixes an decremental for loop target value | | do | Yes | action to do | ==== Literal ==== **<#for var="..." from="..." to="...">**actions**<#endfor>**\\ ==== Example ==== <#for var="i" from="0" to="5"> <#i>
<#endfor>
The above example will output: 0 1 2 3 4 5