Search code examples
loopslanguage-featuresdo-loops

Are there any languages that have a do-until loop?


Is there any programming language that has a do-until loop?

Example:

do
{
    <statements>
}
until (<condition>);

which is basically equivalent to:

do
{
    <statements>
}
while (<negated condition>);

NOTE: I'm looking for post-test loops.


Solution

  • Ruby has until.

    i=0
    begin
      puts i
      i += 1
    end until i==5