Programming-Idioms

Implementation
JS

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating resource.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
do {
	someThing();
	someOtherThing();
} while(c);
do {
	someThing();
	someOtherThing();
} while(c);
do {
  someThing();
  someOtherThing();
} while(c);
loop {
    doStuff();
    if !c { break; }
}
begin
  # code
end while c
do
{
    something;
    somethingElse;
}
while (c);
repeat
  Something;
  SomethingElse;
until
  c;
doowhile c b = do a <- b; if c a
                          then doowhile c b
                          else return a

doowhile (=="") getLine
do {
  someThing();
  someOtherThing();
} while(c);
while True:
    do_something()
    if not c:
        break
do {
    doSomeStuff();
} while(c);
for{
   someThing()
   someOtherThing()
   if !c {
     break
   }
}
do
{
    stuff();
} while(c);
do {
    echo '.';
} while ($c);
repeat
	someThing()
	someOtherThing()
until not c
do_while(Block, C) ->
  case C(Block()) of
    true -> do_while(Block, C);
    false -> ok
  end.
repeat
  Something;
  SomethingElse;
until not c;
for done := false; !done; {
	someThing()
	someOtherThing()
	done = !c()
}
Sub someThing() 
Do 
   [someThing()  1]
   [someThing()  2]
   ...
   [someThing()  n]
   [Exit Do]
   [someThing()  1]
   [someThing()  2]
   ...
   [someThing()  n]
Loop While condition
End Sub 
do {
  someThing()
  someOtherThing()
} while (c)
(loop do (something)
      while c)
do
  call do_something
  if (.not. c) exit
end do
IDENTIFICATION DIVISION.
PROGRAM-ID. "do while" loop.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 boolean-c    PIC x.
   88 c-true    PIC x VALUE 't'.
   88 c-false   PIC x VALUE 'f'.
PROCEDURE DIVISION.
    PERFORM WITH TEST AFTER UNTIL c-false
       PERFORM somthing
    END-PERFORM   
STOP RUN.