beautypg.com

While – Visara Master Console Center Scripting Guide User Manual

Page 210

background image

Chapter 5 Script Commands

Scripting Guide

210

WHILE

Syntax:

WHILE...ENDWHILE

WHILE Expression

Commands
ENDWHILE

Description:

Repeats a sequence of commands while an expression evaluates to

TRUE.

Action:

The commands in the WHILE block are continually executed in
sequence while the expression evaluates to TRUE.

Parameters:

Expression

Boolean expression. The expression to evaluate that

determines whether to continue looping. Refer also to Boolean on page

50.

Returns:

N/A.

Notes:

1. The commands in the WHILE block may never execute because the

expression is evaluated at the beginning of the loop.

2. The number of nested WHILEs is unlimited.
3. The number of commands allowed within the WHILE block is

unlimited.

Example:

%Num := 1
WHILE %Num < 10
INC

%Num

ENDWHILE

See Also:

REPEAT