Difference between revisions of "Repeat"
From Lazarus wiki
Jump to navigationJump to searchm |
|||
Line 1: | Line 1: | ||
− | {{ | + | {{Repeat}} |
− | + | ||
− | This [[ | + | This [[Reserved word|reserved word]] is used in a control construct that is similar to a [[While|<syntaxhighlight lang="pascal" enclose="none">while</syntaxhighlight>]] [[Do|<syntaxhighlight lang="pascal" enclose="none">do</syntaxhighlight>]] loop. |
==Syntax== | ==Syntax== | ||
Line 11: | Line 11: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | * <statement block>: A single | + | * <statement block>: A single [[Pascal]] [[statement]] or a [[Begin|<syntaxhighlight lang="pascal" enclose="none">begin</syntaxhighlight>]]-[[End|<syntaxhighlight lang="pascal" enclose="none">end</syntaxhighlight>]] statement block. |
− | * <condition>: Expression that | + | * <condition>: [[expression|Expression]] that evaluates to a [[Boolean|<syntaxhighlight lang="pascal" enclose="none">boolean</syntaxhighlight>]] value. |
==Example== | ==Example== | ||
Line 26: | Line 26: | ||
{{Keywords}} | {{Keywords}} | ||
− | |||
− |
Revision as of 16:49, 1 July 2019
│
Deutsch (de) │
English (en) │
suomi (fi) │
français (fr) │
русский (ru) │
This reserved word 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 evaluates to a
boolean
value.
Example
x := 1;
repeat
DoSomethingHere(x);
x := x + 1;
until x = 10;
Keywords: begin — do — else — end — for — if — repeat — then — until — while