Siebel eScript Language Reference > Statements Reference > Guidelines for Using Siebel eScript >

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)

Table 19 describes the arguments you can use with the Do While statement.

Table 19. Arguments for 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 );

Siebel eScript Language Reference Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.