Difference between revisions of "Repeat"

From Lazarus wiki
Jump to navigationJump to search
m
Line 1: Line 1:
{{repeat}}
+
{{Repeat}}
<br>
+
 
This [[Keyword|keyword]]  is used in a control construct that is similar to a [[While|while]] [[Do|do]] loop.
+
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 pascal statement or a begin-end statement block.
+
* <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 eveluates to a boolean value.
+
* <condition>: [[expression|Expression]] that evaluates to a [[Boolean|<syntaxhighlight lang="pascal" enclose="none">boolean</syntaxhighlight>]] value.
  
 
==Example==
 
==Example==
Line 26: Line 26:
  
 
{{Keywords}}
 
{{Keywords}}
[[category:Pascal]]
 
[[Category:Control Structures]]
 

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>;

Example

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



Keywords: begindoelseendforifrepeatthenuntilwhile