Previous: 2.2.9.9. Port, PortW, and PortD Statements To the Table of Contents Next: 2.2.9.11. While Statement
2.2.9.9. Port, PortW, and PortD Statements Table of Contents 2.2.9.11. While Statement

- 2.2.9.10. -
Table of Contents
2. TMT Pascal Language Description
2.2. Pascal Language Structure
2.2.9. Statements
2.2.9.10. Repeat Statement


2.2.9.10. Repeat Statement


The repeat statement, much like the for statement, executes one or more statements in a loop. Unlike a for statement where the loop condition is tested prior to each iteration, a repeat statement condition is tested after each iteration. Therefore a repeat loop is executed at least once. repeat takes the following form:
  repeat
    statement [; statement]
  until expression;
where the repeat loop executes until the expression evaluates to the boolean value of True. When the expression is False, the loop is executed again.

The following is an example of the repeat statement:
repeat
  {Do nothing}
until KeyPressed;



Previous: 2.2.9.9. Port, PortW, and PortD Statements To the Table of Contents Next: 2.2.9.11. While Statement
2.2.9.9. Port, PortW, and PortD Statements Table of Contents 2.2.9.11. While Statement

- 2.2.9.10. -