The deccmp() function

The deccmp() function compares two decimal type numbers.

Syntax

mint deccmp(n1, n2)
   dec_t *n1;
   dec_t *n2;
n1
A pointer to the decimal structure of the first number to compare.
n2
A pointer to the decimal structure of the second number to compare.

Return values

-1
The first value is less than the second value.
0
The two values are identical.
1
The first value is greater than the second value.
DECUNKNOWN
Either value is null.