Repeat DO loop

A repeat DO runs a block of code for the specified number of times, with a simple repeat count as the argument.

For example, the DISPLAY command is run 3 times:
DO 3
DISPLAY “HELLO”
END

Use the ITERATE command at any point in the block to start the next iteration of the currently active loop from the DO statement again. Use the LEAVE command to exit the currently active loop and resume processing following the corresponding END statement.

The ITERATE and LEAVE commands can be used only to exit the currently active block.