Loop with condition at the end until is false: repeat until, do loop 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;
Used keywords: repeat until

Input

Note: Here usable statements:
break statement continue statement
Compatible programing languages:
Pascal | Object Pascal | Free Pascal

Examples

Example

i=10;
repeat --i; until ( i == 0);
repeat {
  i++;
  if (i==3)
    break;
} until (i==10);

do loop until

Description

do
statements
loop until condition
Used keywords: do until loop

Input

Note: Here usable statements:
break statement continue statement
Compatible programing languages:
Basic | FreeBASIC | Visual Basic .NET

Examples

Basic

i=10
do
 i=i-1
 loop until ( i = 0)
do
  i=i+1
  if i=3 then
    exit do
end if
loop until (i=10)
Loop with condition at the end until is false in another programming language:
Languages: en hu cz sk