inttypes.5 (2010 09)

i
inttypes(5) inttypes(5)
NAME
inttypes - fixed size integer data types
SYNOPSIS
#include <inttypes.h>
DESCRIPTION
This header file defines integer data types of various sizes. By using the data types defined in this header
file, developers can be assured that the data types will have the same properties and behavior on different
systems.
Since not all implementations are required to support all of the integer sizes defined in this manual page,
the proper way to see if a particular size of an integer is supported on the current implementation is to
test the symbol that defines its maximum value. For example, if
#ifdef UINT64_MAX tests false, then
that implementation does not support 64-bit unsigned signed integers.
The
<inttypes.h> header includes <stdint.h> header.
This header file defines the following data type.
imaxdiv_t structure type that is the type of the value returned by the
imaxdiv() function
The following macros can be used as formatting options with the
printf() family of functions (see
printf (3S)). These macros are used to select the correct formatting option for the integer data types
defined earlier in this manual page.
PRId8 d print formatting option for int8_t
PRId16 d print formatting option for int16_t
PRId32 d print formatting option for int32_t
PRId64 d print formatting option for int64_t
PRIdMAX d print formatting option for intmax_t
PRIdFAST8 d print formatting option for int_fast8_t
PRIdFAST16 d print formatting option for int_fast16_t
PRIdFAST32 d print formatting option for int_fast32_t
PRIdFAST64 d print formatting option for int_fast64_t
PRIdFAST d print formatting option for intfast_t
PRIdLEAST8 d print formatting option for int_least8_t
PRIdLEAST16 d print formatting option for int_least16_t
PRIdLEAST32 d print formatting option for int_least32_t
PRIdLEAST64 d print formatting option for int_least64_t
PRIi8 i print formatting option for int8_t
PRIi16 i print formatting option for int16_t
PRIi32 i print formatting option for int32_t
PRIi64 i print formatting option for int64_t
PRIiFAST8 i print formatting option for int_fast8_t
PRIiFAST16 i print formatting option for int_fast16_t
PRIiFAST32 i print formatting option for int_fast32_t
PRIiFAST64 i print formatting option for int_fast64_t
PRIiLEAST8 i print formatting option for int_least8_t
PRIiLEAST16 i print formatting option for int_least16_t
PRIiLEAST32 i print formatting option for int_least32_t
PRIiLEAST64 i print formatting option for int_least64_t
PRIu8 u print formatting option for uint8_t
PRIu16 u print formatting option for uint16_t
PRIu32 u print formatting option for uint32_t
PRIu64 u print formatting option for uint64_t
PRIuMAX u print formatting option for uintmax_t
PRIuFAST8 u print formatting option for uint_fast8_t
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)