Name

Repeat Keyword

Syntax

repeat
  Statements...
until Boolean expression

Description

Delphi’s repeat statement works the same way as that of standard Pascal. The Statements are executed repeatedly until the Boolean expression is True.

Tips and Tricks

  • The Statements always execute at least once.

  • You don’t need begin and end to define a block because the repeat and until keywords delimit the statement list.

Example

if FindFirst(Path, faAnyFile, Search) = 0 then
try
  repeat
    MungFile(Path + Search.Name);
  until FindNext(Search) <> 0;
finally
  FindClose(Search);
end;

See Also

Boolean Type, Break Procedure, Continue Procedure, For Keyword, Until Keyword, While Keyword
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset