Free Pascal - Loop with condition at the end until is false: repeat until
Condition testing is done at the end of the loop. after each iteration the condition is tested, if it is was true. if the specified condition is false, then the loop will continue run, otherwise it will be completed.repeat until
Description
repeat statements until condition;
Input
- statements - statements
- condition - Logical value The condition can be any expression
Examples
Free Pascal
i:=10;
repeat dec(i) until ( i = 0);
repeat
inc(i);
if i=3 then
break;
until (i=10);
Free Pascal
Other pieces of example codes:repeat inc(i); if i=5 then break; until not i <10;
repeat dec(i) until not i > 0;
Loop with condition at the end until is false in another programming language:
Differences to: