Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference > Siebel eScript Language Overview > eScript Statements >
do...while Statement
The do...while statement processes a block of statements until a specified condition is met.
Syntax
do
{
statement_block;
} while (condition)
Placeholder Description statement_block One or more statements to be executed within the loop condition An expression indicating the circumstances under which the loop should be repeatedReturns
Not applicable
Usage
The do statement processes the statement_block repeatedly until condition is met. Because condition appears at the end of the loop, condition is tested for only after the loop executes. For this reason, a do...while loop is always executed at least once before condition is checked.
Example
This example increments a value and prints the new value to the screen until the value reaches 100.
var value = 0;
do
{
value++;
Clib.sprintf(value);
} while( value < 100 );See Also
Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference Published: 18 April 2003 |