Sheltran -


Form:

      
      REPEAT 
         <statement>...
    [    XREPEAT
         <statement>...  ] 
      UNTIL <logical expression>

Actions:

The statements between REPEAT and UNTIL are executed, and <logical expression> evaluated. When <logical expression> has the value .TRUE., control is transferred to the the statement after UNTIL; if it is .FALSE., the statement after REPEAT gains control. At any point in the REPEAT loop an XREPEAT statement may be inserted. This statement transfers control to the statement following UNTIL, independently of <logical expression>.

Example:

     REPEAT
        CALL WAIT(EVENT)
        SELECT EVENT
        CASE 1
           CALL TYPEIN 
        CASE 2,3,7,4
           CALL SERVE
        OTHER 
           FINISH=.TRUE. 
        CSELECT 
     UNTIL FINISH

Programming GIPSY