
Chapter 5 Script Commands
Scripting Guide 91
DEC
Syntax:
DEC %Variable
Description:
Subtracts one from a numeric variable’s value.
Action:
The value in the specified variable is reduced by one.
Parameters:
%Variable. Numeric variable. Name of the integer variable to
decrement.
Returns:
N/A.
Notes:
The DEC() command is a shortcut for subtracting one from itself. The
following two statements are equivalent, but the first one executes
many times faster:
DEC %Var
%Var := %Var—1
Example:
*START:
%NumEx := 9 //init to 9
*COUNTING:
REPEAT
//display value to filtered msgs window
LOG( LOG_FLT, “COUNTER=” + STR( %NumEx))
DEC %NumEx //subtract 1
UNTIL %NumEx < 1
See Also:
INC, SET
Kommentare zu diesen Handbüchern