Next: , Previous: CWord, Up: Reference



Cycle

Synopsis

     Cycle  { simple statement }

Description

Cycle goes on with loop iteration by jumping to the end of the current loop body. Note: Cycle can only stand within a while, repeat or a for loop.

Conforming to

Cycle is a Mac Pascal extension. Borland Pascal has Continue instead.

Example

     program CycleDemo;
     var
       Foo, Bar: Integer;
     begin
       WriteLn ('Enter three numbers:');
       for Bar := 1 to 3 do
         begin
           ReadLn (Foo);
           if Foo < 5 then
             Cycle;
           WriteLn ('Your number was greater than 5.')
         end
     end.

See also

Loop Control Statements, Break, Continue, Exit, Halt, Leave, Return, goto.