int IntCompare (void *item1, void *item2);
Compares two integers. This function may be used anywhere a function of type CompareFunction is required. Specifically, you may pass this function to one of the following functions:
BinSearch
InsertionSort
ListInsertInOrder
ListFindItem
ListRemoveDuplicates
ListBinSearch
ListQuickSort
ListHeapSort
ListInsertionSort
ListIsSorted
Input | ||
Name | Type | Description |
item1 | void * | This parameter expects to be passed a pointer to an int. This int will be compared to the int pointed to by item2. |
item2 | void * | This parameter expects to be passed a pointer to an int. This int will be compared to the int pointed to by item1. |
Name | Type | Description |
comparisonResult | integer | Returns the result of the comparison of the integers pointed to by item1 and item2. If item1 > item2 the result is a positive number ( > 0). If item1 == item2 the result is zero (0). If item1 < item2 the result is a negative number ( < 0). |