Forces a jump to the next iteration of a loop System unit
 procedure Continue ;
The Continue procedure forces a jump past the remaining statements within a loop, back to the next loop iteration. Like the Goto statement, it should be used with caution.
It is important to note that the Continue statement only jumps to the start of the current loop - not out of any nested loops above it. The Goto statement can.
Use with caution.
Related commands
Break Forces a jump out of a single loop
For Starts a loop that executes a finite number of times
Goto Forces a jump to a label, regardless of nesting
Repeat Repeat statements until a ternmination condition is met
While Repeat statements whilst a continuation condition is met
Abort Aborts the current processing with a silent exception
 Author links

 Download this web site as a Windows program.

Example code : Skipping loop processing for certain loop values
  i : Integer;
  s : string;

  s := '';

  // A big loop
  for i := 1 to 9 do
    // Skip loop processing for certain values of i
    if (i = 3) or (i = 7) then Continue;
    s := s + IntToStr(i);
    s := s + ' ';

  // Show the string created by the above loop
  ShowMessage('s = '+s);
Show full unit code
   s = 1 2 4 5 6 8 9
Delphi Programming Neil Moffatt 2002 - 2020. All rights reserved.  |  Home Page