Item

ItemGetNInt

Read a signed 64-bit integer from an ITEM

Syntax

Signature
int64_t ItemGetNInt( const ITEM *item );

Arguments

item is the ITEM to read.

Return value

The stored signed 64-bit integer. Finite doubles that fit after truncation are truncated toward zero. Other types and non-finite doubles return 0.

Description

Use ItemGetND() to retain the fractional part of a double.

Example

itemgetnint.c
#include "xdev-wtui.h"

#include <inttypes.h>
#include <stdio.h>

int main( void )
{
   ITEM *item = ItemPutNInt( NULL, INT64_C( 5000000000 ) );

   printf( "%" PRId64 "\n", ItemGetNInt( item ) );
   ItemRelease( item );

   return 0;
}

Output

5000000000

See also