ITERATE


ITERATE

Function

The ITERATE statement causes an immediate iteration of the innermost DO WHILE, DO FOREVER, or iterative DO loop.

When WSim encounters this statement, it stops execution of the statements within the loop, and passes control back to the DO statement. When it is a DO WHILE statement WSim evaluates the condition and executes the DO WHILE group of statements again if the condition is true. If it is a DO FOREVER statement, the statement group is executed again. When it is an iterative DO statement, the value of the control variable is incremented, and the DO statement group is executed again if the new value does not exceed the exit value.

Examples

The following code transmits the numbers 0-19 and 21-99. The number 20 will not be transmitted.
b = 20
do a = 0 to 99
   if b = a then
      iterate
   type char(a)
   transmit
end

Note

You can code the ITERATE statement only inside a repetitive DO loop.