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).