Continue { simple statement }
Continue
goes on with loop iteration by jumping to the end of
the current loop body. Note: Continue
can only stand within a
while
, repeat
or a for
loop.
Continue
is a Borland Pascal extension, Mac Pascal has
Cycle
instead.
program ContinueDemo; var Foo, Bar: Integer; begin WriteLn ('Enter three numbers:'); for Bar := 1 to 3 do begin ReadLn (Foo); if Foo < 5 then Continue; WriteLn ('Your number was greater than 5.') end end.