Function : Item (Field)

NSFItemLongCompare - Compare (long) item to a given (long) value.
----------------------------------------------------------------------------------------------------------

#include <nsfnote.h>

BOOL LNPUBLIC NSFItemLongCompare(
NOTEHANDLE note_handle,
const char far *item_name,
long long _value,
int far *result_ptr
);

Description :

This function takes a handle to an open note, the name for the TYPE_NUMBER Item whose value you wish to compare, the (long) value to be used in the comparison. It returns a int whose value indicates the result of the comparison: -1 if item (long) is greater, 0 if they are equal, and 1 if item (long) is less.

Parameters :

Sample Usage :

/* Compare  ULONG in Note to another value */

ulong_num2 = 3430000L;
printf("Is ULONG in Note equal to %lu ?\n", ulong_num2);
if (NSFItemIsPresent(note1_handle, ULONG_ITEM,strlen(ULONG_ITEM)))
{
  NSFItemLongCompare(note1_handle, ULONG_ITEM,
                         (long) ulong_num2, &answer);
  if (answer == 0)
     printf("Answer: %s\n", "YES YES YES!");
  else if(answer != 0)
     printf("Answer: %s\n", "Nooooooooo!");
}


See Also :

NSFItemGetLong
----------------------------------------------------------------------------------------------------------