incr/3—return an integer or enumeration slot value incremented by a specified value
The general syntax for the incr/3
operation is as follows:
$VAL=incr($SLOT,$INCR)
incr/3 arguments
Argument | Mode | Type | Description |
---|---|---|---|
| Input | SLOTREF | Specifies an integer or enumeration slot for which the incremented value is to be returned |
| Input | INTEGER | Specifies the number by which the slot value is to be incremented when it is returned in |
| Output | INTEGER|ENUM | Value of the slot incremented by |
Use incr/3
to retrieve the value of the slot referenced in $SLOT
incremented by $INCR
in $VAL
. For an enumeration, the slot value returned is incremented by $INCR
higher values. If there are not $INCR
higher values, then the slot value returned is incremented to the highest value available.
The referenced slot itself is not modified.
incr/3 example
$NEWPRIO = incr( $E.mc_priority , 2 );
Comments
Log in or register to comment.