next up previous contents
Next: Exit and Cycle with Up: More on DO Loops Previous: Conditional EXIT   Contents

Conditional CYCLE

  $\langle exec\_stmts_1 \rangle$ 
  if ( $\langle logical\_expr \rangle$ ) cycle
  $\langle exec\_stmts_2 \rangle$  
end do

If ession is true, CYCLE is executed; it forcess control to bypass and to jump to the DO statement; the loop will then start the next iteration. A CYCLE statement outside the body of a loop is an error.

For example, the Fahrenheit to Celsius program can skip the conversion of the temperatures that are unreasonably high, say or above. Try this example!

Adrian Sandu 2001-08-26