do - while statement

The do-while statement repeatedly executes a piece of code until a condition is no longer satisfied.
      do
          statement group
      while expression;
It will execute the statement group first and then evaluate the logical value of expression. If it's false, the loop is over. If it's true, the statement group will be executed again, until expression becomes false.

A do-while statement always carries out the sequence statements at least once.



oz 2009-12-22