Alertra Script Language 1.9

while

The while loop allows iteration an unknown number of times. Note that scripts will only execute a maximum of 5,000 commands before generating a runtime error. This is to keep any script from running out of control.

You can use the 'begin' keyword in place of the statement to execute multiple commands on each iteration. Be sure to terminate the loop with an 'end' statement:

while $N != 10 begin .... end

usage: while [expr] loop [statement] [;] [statement...]

parameters:

req name type description
Y expr expression Expression evaluated before each iteration
Y statement statement The command(s) to execute on each iteration of the loop

examples

while $N != 10 loop $N = $N + 1

Increments the variable N until its value is equal to 10.


Alertra Script Language: Language Reference