next up previous contents
Next: Creating Labels Up: Execution Control Previous: Stopping the execution   Contents

Creating a Loop

You can repeat an arbitrary number of commands more than once by constructing a loop. A loop is started with 2 W(HILE) B(EGIN) <variable> ; [example: W   B   A ;]

and ended with 2 W(HILE) E(ND) ; [example: W   E ;]

The commands in between are repeated until <variable> becomes smaller than 0. The value of <variable> has to be changed, or you risk to create an infinite loop.

KPII
1999-10-20