Name
Repeat Keyword
Syntax
repeatStatements
... untilBoolean 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
andend
to define a block because therepeat
anduntil
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 |
Get Delphi in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.