Exits one or more enclosing FOR, REPEAT, or WHILE loops. Format EXITLOOP [integer]
1 – Parameters
integer A decimal integer that specifies the number of nested loops to exit from. The default is 1.
2 – Description
Use the EXITLOOP command to exit one or more enclosing FOR, REPEAT, or WHILE loops. Related commands: FOR REPEAT WHILE
3 – Example
DBG> WHILE 1 DO (STEP; IF X .GT. 3 THEN EXITLOOP) The WHILE 1 command generates an endless loop that executes a STEP command with each iteration. After each STEP, the value of X is tested. If X is greater than 3, the EXITLOOP command terminates the loop (Fortran example).