Admin Production ni-theme
Current Publication

ShortCompare

LabWindows/CVI

ShortCompare

int ShortCompare (void *item1, void *item2);

Purpose

Compares two short integers. This function may be used anywhere a function of type CompareFunction is required. Specifically, this function may be passed to one of the following functions:

BinSearch
InsertionSort
ListInsertInOrder
ListFindItem
ListRemoveDuplicates
ListBinSearch
ListQuickSort
ListHeapSort
ListInsertionSort
ListIsSorted

Parameters

Input
Name Type Description
item1 void * This parameter expects to be passed a pointer to a short int. This short will be compared to the short pointed to by item2.
item2 void * This parameter expects to be passed a pointer to a short int. This short will be compared to the short pointed to by item1.

Return Value

Name Type Description
comparisonResult int Returns the result of the comparison of the shorts 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).

Additional Information

Library: Programmer's Toolbox

Include file: toolbox\toolbox.h

LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later