Repeat

From Lazarus wiki
Revision as of 17:50, 10 November 2007 by Djzepi (talk | contribs) (New page: This keyword is used in a control construct that is similar to a while do loop. Syntax: '''repeat''' ''' <statement block>''' '''until <condition>;''...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This keyword is used in a control construct that is similar to a while do loop.

Syntax:

 repeat
   <statement block>
 until <condition>;

<statement block>: A single pascal statement or a begin-end statement block.

<condition>: Expression that eveluates to a boolean value.

Example:

 x := 1;
 repeat
 begin
   DoSomethingHere(x);
   x := x + 1;
 end;
 until x = 10;



Keywords: begindoelseendforifrepeatthenuntilwhile