Difference between revisions of "Repeat"
From Free Pascal wiki
Jump to navigationJump to searchm |
Jwdietrich (talk | contribs) |
||
Line 26: | Line 26: | ||
{{Keywords}} | {{Keywords}} | ||
[[category:Pascal]] | [[category:Pascal]] | ||
+ | [[Category:Control Structures]] |
Revision as of 18:41, 30 September 2013
Template:repeat
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: begin — do — else — end — for — if — repeat — then — until — while