Do While Statement

The Do While statement processes the code that the statement_block argument identifies repeatedly until the statement meets the value that the condition argument contains. The condition argument occurs at the end of the loop. Siebel eScript tests the condition only after the loop runs. A Do While loop always runs at least one time before Siebel eScript examines the condition.

Format

do
{
   statement_block;
}
while (condition)

The following table describes the arguments you can use with the Do While statement.

Argument Description

statement_block

One or more statements that Siebel eScript runs in the loop.

condition

An expression that describes the condition that Siebel eScript uses to repeat the loop.

Example

The following 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 );