Loop statements  do

Chapter 1: Overview

while

The while statement tests an expression, and if the value of the expression is true (non-zero), executes the associated statements. It then tests the expression again, and continues in this pattern until the expression is false (zero). If using a while loop, loop commands might not execute. To guarantee that the loop commands execute at least once, use a do statement.

while (expression)
{
   do these commands;
}




Copyright © 2005. Sybase Inc. All rights reserved. do

View this book as PDF