Scripting in StreamServe > StreamServe scripting language specifics > Conditional statements > The while statement

The while statement
A while statement is executed as long as the expression is true.
Syntax
while(expression) 
{
statement1;
[break;]
[statement2;]
[continue;]
[statement3;]
}
Examples
Example 24
$copiesLeftToPrint = &copies;
Clear($copytext);
while (Num($copiesLeftToPrint) >= 0)
{
if(Num($copiesLeftToPrint) != Num(&copies)) {
$copytext = "COPY";
}
CallProc("procInvoice");
$copiesLeftToPrint--;
}
 
OpenText StreamServe 5.6.2 Updated: 2018-01-26