Loading

BREAK

logic control

The BREAK function breaks out of the current loop. It takes no argument.

If used outside a loop, an error is thown

BREAK is available since version 1.0.0.

See also

Signatures

Examples

// Find the first number divisible by 5 in a list [ 1 2 3 4 5 6 7 8 9 10 ] // The list <% 'number' STORE $number <% 5 % 0 == %> // Condition: number modulo 5 == 0 <% $number BREAK %> // Then BREAK IFT %> FOREACH