| Samsung Internal API reference 2.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Macros
inttypes.h File Reference

integer type declrations. More...

Go to the source code of this file.

## Macros
#define | PRId16 __16_PREFIX "d"
#define | PRId32 "d"
#define | PRId64 __64_PREFIX "d"
#define | PRIu16 __16_PREFIX "u"
#define | PRIu32 "u"
#define | PRIu64 __64_PREFIX "u"
#define | PRIx16 __16_PREFIX "x"
#define | PRIx32 "x"
#define | PRIx64 __64_PREFIX "x"
#define | SCNd16 __16_PREFIX "d"
#define | SCNd32 "d"
#define | SCNd64 __64_PREFIX "d"
#define | SCNu16 __16_PREFIX "u"
#define | SCNu32 "u"
#define | SCNu64 __64_PREFIX "u"
#define | SCNx16 __16_PREFIX "x"
#define | SCNx32 "x"
#define | SCNx64 __64_PREFIX "x"

## Detailed Description

integer type declrations.

Copyright
  (C) 2012-2019, Samsung Electronics Co., Ltd.

The following macros shall be defined. Each expands to a character string literal containing a conversion specifier, possibly modified by a length modifier, suitable for use within the format argument of a formatted output function when converting the corresponding integer type. These macros have the general form of PRI followed by the conversion specifier (for ex.: d, u, x), followed by a name corresponding to a similar type name in <stdint.h>.

Example:

#include <stdio.h>
#include <inttypes.h>
int main(void)
{
uint32_t var = 0xDEADC0DE;
printf("print in hex: 0x%" PRIx32 "\n", var);
return 0;
}