Break

Top  Previous  Next

Description


The Break statement exits a While or a For loop without completing any remaining iterations of the loop or executing any remaining commands within the loop. For more detailed information, see the Flow Control Script Reference.

 

 

Syntax


For myVariable = 1 to 10;
    If (myVariable > 5);
          Break;
    End;
    Report myVariable;
End;

 

Output
 

1.000000
2.000000
3.000000
4.000000
5.000000

 

 

Details


The Break statement can only be used within a For or While loop, or as a part of the Switch/Case/Break statement syntax.

In the case of nested For or While loops, the Break statement will only exit the innermost loop.

 

 

See Also


Continue

For

If

While