decr/2 and prev/2—return an integer or enumeration slot value decremented by 1
The decr/2 and prev/2 operations return an integer or enumeration slot value decremented by 1.
The syntax for decr/2 operation is as follows:
$VAL=decr($SLOT)
decr/2 arguments
Argument | Mode | Type | Description |
---|---|---|---|
$SLOT | Input | SLOTREF | Specifies an integer or enumeration slot for which the decremented value is to be returned. |
$VAL | Output | INTEGER|ENUM | Value of the slot decremented by 1 |
Use decr/2 to retrieve the value of the slot referenced in $SLOT decremented by 1 in $VAL. For an enumeration, the slot value returned is decremented to the next lower value. If there is no lower value, the slot value returned remains unmodified.
The referenced slot itself is not modified.
decr/2 example
$NEWPRIO = decr( $E.mc_priority );
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*