UNTIL


control
Since v1.0.0
Available on all platforms
See also

Configuration parameters


The UNTIL function implements an until loop. It takes two macros as arguments from the stack: the code to execute until the condition is true and the condition to evaluate after every iteration.

If one iteration takes too long (warpscript.maxloop) the loop will be killed.

Signature

Examples

5 <% // Exec macro: we duplicate the top of the stack and we decrease it by one DUP 1 - %> <% DUP 1 <= %> // Condition macro: top of the stack bigger than 1 UNTIL 'smaller or equal to 1' // Then the last number found should be smaller or equal to 1