sign/2—determine whether a numeric value is positive, negative, or zero
The sign/2 function determines whether a numeric value is positive, negative, or zero.
$SIGN=sign($NUMBER)
sign/2 arguments
Argument | Mode | Type | Description |
---|---|---|---|
$NUMBER | Input | INTEGER|REAL | Specifies the numeric (integer or real) value for which the sign is to be returned |
$SIGN | Output | INTEGER | Returns the sign of the number. Possible values include:
|
The sign/2 function returns the sign of the numeric value specified by the $NUMBER argument and returned as $SIGN.
sign/2 example
$SIGN = sign( $AVERAGE_DURATION - real($E.duration) );
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*