CFNumberCompare |
||||
Header: | CFNumber.h | Carbon status: | Supported | |
Compares two CFNumber objects and returns the comparison result.
CFComparisonResult CFNumberCompare ( CFNumberRef number, CFNumberRef otherNumber, void *context );
The first CFNumber object you wish to compare.
The second CFNumber object you wish to compare.
Pass NULL.
Indicates whether the first CFNumber is equal to, less than, or greater than the second CFNumber. The comparison result is returned as a CFComparisonResult.
When comparing CFNumber objects, conversion and comparison follow human expectations and not C promotion and comparison rules. Negative zero compares less than positive zero. Positive infinity compares greater than everything except itself, to which it compares equal. Negative infinity compares less than everything except itself, to which it compares equal. Unlike standard practice, if both numbers are NaN, then they compare equal; if only one of the numbers is NaN, then the NaN compares greater than the other number if it is negative, and smaller than the other number if it is positive.
Supported in Carbon. Available in Carbon 1.0.2 and later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)