Logo

Programming-Idioms

  • Ruby

Idiom #78 "do while" loop

Execute a block once, then execute it again as long as boolean condition c is true.

do {
	someThing();
	someOtherThing();
} while(c);

The block code is not repeated in the source.
do f();
while (c);
begin
  # code
end while c
loop
   stuff();
   if not c then
      exit;
   end if;
end loop;

New implementation...
< >
deleplace