Continue

www.kxcad.net Home > Electronic Index > Altium(Protel) Index


Your Ad Here

Declaration

Procedure Continue;

Description

The Continue procedure returns control to the next iteration of For, While or Repeat statements. The Continue statement jumps over the body of a loop, similar to the goto statement. That is, the continue statement causes the executing script to pass to the next iteration in the current For, While or Repeat loop.

Example

Var

    F: File;

    i: Integer;

Begin

    For i := 0 to (FileListBox1.Items.Count - 1) do

    Begin

    Try

        If FileListBox1.Selected[i] Then

        Begin

            If not FileExists(FileListBox1.Items.Strings[i]) then

            Begin

                MessageDlg('File: ' + FileListBox1.Items.Strings[i] +

                   ' not found', mtError, [mbOk], 0);

                Continue;

            End;

            AssignFile(F, FileListBox1.Items.Strings[i]);

            Reset(F, 1);

            ListBox1.Items.Add(IntToStr(FileSize(F)));

            CloseFile(F);

        End;

        Finally

            { do something here }

        End;

    End;

End;

See also

Break, For, Repeat and While keywords.

Your Ad Here