Search                        Top                                  Index
HELP QUITLOOP                                   Steven Hardy, February 1982

This is used to jump out of a loop, for example:

    define search(item, list);
        until list == [] do
        if hd(list) + item then quitloop endif;

QUITLOOP is equivalent to '*GOTO just after the next ENDUNTIL (or ENDWHILE or
similar closing bracket)'. QUITLOOP can optionally be followed by an integer N
in parentheses in which case it jumps out of the Nth enclosing loop, for


N.B. QUITLOOP is not a procedure and cannot be called by a procedure inside
the loop: it must be used inside the loop body itself.

    *NEXTLOOP   - to continue next enclosing loop
    *QUITIF     - to jump out of a loop if a condition becomes true
    *QUITUNLESS - to jump out of a loop unless a condition is true
    *RETURN     - to terminate execution of current procedure
    *LOOPS      - for types of iteration available in POP-11
    *CONTROL    - for types of control structure available in POP-11