incr/4—retrieve the value of an integer or enumeration slot  incremented by a given value within a specified  limit


The incr/4 enumeration operation retrieves the value of an integer or enumeration slot  incremented by a given value within a specified limit. The general syntax for the incr/4 operation is as follows:

$VAL=incr($SLOT,$INCR,$LIMIT)

incr/4 arguments

Argument

Mode

Type

Description

$SLOT

Input

SLOTREF

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

$INCR

Input

INTEGER

Specifies the number by which the slot value is to be incremented when it is returned in $VAL

$LIMIT

Input

INTEGER|ENUM

Specifies the limit to which the slot value is to be incremented when it is returned in $VAL

$VAL

Output

INTEGER|ENUM

Value of the slot incremented by $INCR

Use incr/4 to retrieve the value of the slot referenced in $SLOT incremented by $INCR, limited to the value $LIMIT in $VAL. For an enumeration, the slot value returned is incremented by $INCR higher values, limited to $LIMIT.

The referenced slot itself is not modified.

incr/4 example

$NEWPRIO = incr( $E.mc_priority , 2 , PRIORITY_2 );

 

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