Development tools : Global functions : BigDecimal Manipulation category : compare
  
compare
Description
Compares the value of number1 and number2.
Usage
Client side: N
Server side: Y
Syntax
BigDecimal compare(number1, number2, precision)
Argument
number1
The first number to be compared. The default value is 0. The data type is Number.
number2
The second number to be compared. The default value is 0. The data type is Number.
precision
The number of digits to be retained after decimal point in number1 and number2. The default value is -1, which means original values are used for comparison.
Note Nonnumeric strings in number1 and number2 are regarded as the default value 0.
Return
If number1 < number2, returns -1.
If number1 = number2, returns 0.
If number1 > number2, returns 1.
Go up to
BigDecimal Manipulation category