beautypg.com

Visara Master Console Center Scripting Guide User Manual

Page 136

background image

Chapter 5 Script Commands

Scripting Guide

136

INC

Syntax:

INC %Variable

Description:

Adds one to a numeric variable’s value.

Action:

The value in the specified variable is increased by one.

Parameters:

%Variable. Numeric variable. Name of the integer variable to

increment.

Returns:

N/A

Notes:

The INC() command is a shortcut for adding one to itself. The
following two statements are equivalent, but the INC() command

executes much faster:
INC

%Var

%Var := %Var + 1

Example:

*START:

%Num := 0

//init to 0

*COUNTING:
REPEAT

//display value to filtered msgs window

LOG( LOG_FLT, “COUNTER=” + STR( %Num))

INC

%Num

//add

1

UNTIL %Num > 9

See Also:

DEC, SET