repeat loop
repeat loop
(programming)Repeat loops are found in Perl, Pascal, BASIC and C.The initial keyword may be "repeat" or "do" and thecondition may be introduced with a "while" or "until" keyword.
In constrast to a while loop, the "loop body" is executedonce before the condition is tested. This is useful when thecondition depends on the action of the loop body. In thefollowing BASIC loop "Hello" is printed once despite the factthat the condition is false;
i = 2repeatprint "Hello"i = i+1until i>0
See also while loop and for loop.