Loop - quit |
Top Previous Next |
The "loop" statement has the form:
loop STATEMENT
A "loop" command repeatedly executes the following statement or block. A "quit" statement is used to exit from any point (or points) within the loop. Usually a "quit" is used in an "if" statement so that the loop exits under certain conditions. For example:
loop begin InputGuess; if Guess = Number then quit; TestGuess end |