Repeat statement


Repeat statements perform an action in a conditional loop until the loop condition is true, and include the following:

NOTE: The loop condition is evaluated after the statement-sequence is executed so the statement-sequence is executed at least once. Usually the statement-sequence will perform some action that will eventually cause the loop condition to be true and terminate the loop.


For example, below is a very simple program which illustrates the use of the "repeat" statement.

   program ten(output);
      count : 1..11;
      count := 1;
         count := count + 1
      until count > 10


(NOTE: for clarity some parts of the syntax are omitted, see Irie Pascal Grammar for the full syntax):

   repeat-statement = 'repeat' statement-sequence 'until' boolean-expression

   statement-sequence = statement { ';' statement }