This is an old revision of the document!
Compare two values.
Syntax
Parameters
term1
- The first term.term2
- The second term.method
- Sort method options.0
(default) - Compare items using standard comparison.1
- Compare items as case-sensitive strings.2
- Compare items as case-insensitive strings 3
- Compare items as case-sensitive strings, using natural ordering.4
- Compare items as case-insensitive strings, using natural ordering.length
- The optional length
parameter only has any effect if method
is 1
or 2
. If so, it will determine how many of the characters from each String will be used for comparison.
Result
0
- A Number less than 0
is returned if term1
is less than term2
.0
- A Number less than 0
is returned if term1
and term2
are equal.0
- A Number greater than 0
is returned if term1
is greater than term2
.
Returns a Number signifying which of the two terms being compared is greater.
~~DISCUSSION~~