Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

decr/3—retrieve the value of an integer or enumeration slot  decremented by a specified value


The decr/3 operation retrieves the value of an integer or enumeration slot  decremented by a specified value. The syntax for the decr/3 operation is as follows:

$VAL=decr($SLOT,$DECR)

decr/3 arguments

Argument

Mode

Type

Description

$SLOT

Input

SLOTREF

Specifies an integer or enumeration slot for which the decremented value is to be returned.
The actual value of the slot is not decremented.

$DECR

Input

INTEGER

Specifies the number by which the slot value returned in $VAL is to be decremented

$VAL

Output

INTEGER|ENUM

Value of the slot decremented by $DECR

Use decr/3 to retrieve the value of the slot referenced in $SLOT decremented by $DECR in $VAL. For an enumeration, the slot value is decremented to the $DECR next lower value. If there are no $DECR lower values, the slot value is decremented to the lowest value.

The referenced slot itself is not modified.

decr/3 example

$NEWPRIO = decr( $E.mc_priority , 2 );

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*