High level language
155
$WHILE
$ENDWHILE
$BREAK
$CONTINUE
Conditional block repetition WHILE.
$WHILE <condition>
$ENDWHILE
$BREAK
$CONTINUE
Note: while the condition is true, it executes
the blocks contained between $WHILE and
$ENDWHILE. The condition is analyzed at
the beginning of each new repetition.
The $BREAK instruction lets ending block
repetition even if the stop condition is not
met. The execution of the program will
continue at the block after $ENDWHILE.
The $CONTINUE instruction starts the next
repetition even when the current one has
not finished. The blocks programmed after
$CONTINUE up to $ENDWHILE will be
ignored in this repetition.
Es.:
P1=0
$WHILE P1<=10
P1=P1+1
… (executes this program section until P1 is
greater than 10, then it finishes)
$ENDWHILE
…
Instruction Meaning