endloop
Completes a loop construct.
Syntax
endloop
Input
N/A
Example
- Example 1
- Template:
{for(a=0; a<=PI/2; a += PI/12)} Angle: {a, %6.4¦} Sin: {sin(a), %6.4¦} {endloop}
- Example 2
- Template:
{num = 0} {gmat = {10, 20, 30, 40}} {foreach(elem=gmat); num++} Element {num}: {elem} {endloop}
Comments
Every loop construct in a template must end with an endloop statement. Loop constructs include for, foreach, and while. When a loop terminates, the statement following the endloop statement is executed.