do Loop

From NWN Lexicon
(Redirected from Do)
Jump to navigationJump to search

The statements within a do code block are executed and then the condition of the loop is evaluated. This ensures that the statements will execute at least once. If the condition evaluates to FALSE the loop will halt.

// prototype
// do { statement; } while (expression);

// actual use
int i;
} while (i < 5);

 author: Ryan Hunt, editors: Charles Feduke, Mistress, contributor: Ken Cotterill