9.11 Skip over loops
---------------------
For 'BREAK', 'break', 'CONTINUE', and 'continue', support has been
added for a numerical parameter which defines how many loops are skipped
before breaking or continuing. In the following example there are three
embedded loops:
do{
loop(CX){
for(BX=0;BX<10;BX++){
break; //standard statement
break 0; //break with parameter - skip 0 loops
break 1; //break with parameter - skip 1 loops
break 2; //break with parameter - skip 2 loops
}
LABL0:
}
LABL1:
}while (DX!=0);
LABL2:
In the third loop there is a group of different variants of 'break'.
The first is standard 'break', which causes control to be passed beoynd the
third loop, to 'LABL0'. The second is 'break 0', which causes 0 loops to be
skipped and control, again, to be passed to 'LABL0'. Thus 'break' and
'break 0' are synonyms. The third variant is 'break 1', which causes the
program to skip one loop and pass control beyond the second loop to
'LABL1'. Finally there is 'break 2', which causes the program to skip two
loops and transfer control beyond the third loop to 'LABL2'. The labels in
this example are given for the sake of explanation. I hope it will be clear
to the reader that the value of a parameter cannot exceed the number of
loops before the current loop, and thus for a single loop there is only one
possible value, 0.