RAD Studio |  |

continue
See Also
Collapse All

Category

Statements

Syntax

Copy Code

    continue;

Description

Use the continue statement within loops to pass control to the end of the innermost enclosing end brace belonging to a looping construct, such as for or while; at which point the loop continuation condition is re-evaluated.

Example

This example illustrates the use of the keyword continue.

Copy Code

    void __fastcall TForm1::Button1Click(TObject *Sender)
    {
      float array[20];

      // Code to initialize array...
      for (int i = 0; i < 20; i++)
      {
        array[i] = random(i + 20);
      }
      array[6] = 0;

            for (int i = 0; i < 20; i++)
      {
        if (array[i] == 0)
          continue;
        array[i] = 1/array[i];
        ListBox1->Items->Add(array[i]);
      }
    }

See Also

for

while

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!