SHIP:Sail:Flow Control:do

From Serious Documentation
Revision as of 17:25, 1 November 2016 by CarltonHeyer (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

See Also

do

A loop control construct that guarantees the loop executes at least one time.

Statement Description
do Starts a loop control which executes once before being evaluated for termination via while statement.

Example

a = 10;
do {
   printf("%d,", a);
   if(a == 10)
      break;
   a -= 1;
}while(a);

Prints: 10