Many components of the NASD tree will wish, at times, to output
data, as with printf()
. This need is not limited to
various front-end programs for NASD functionality, although it is
most obvious there. Many programmers find it useful to add diagnostic
output to their code, either to indicate the nature of an unexpectedly
irrecoverable error, or to debug work in progress. For that reason,
NASD provides macro definitions for some format strings and "preferred"
formatting for other types. These are enumerated in the table below.
Note that some of these types will be described in later portions of
this document.
Type name | Description | Output format |
---|---|---|
nasd_byte | One byte | "0x%02x" |
nasd_int8 | An eight-bit signed integer | "0x%02x" |
nasd_uint8 | An eight-bit unsigned integer | "0x%02x" |
nasd_int16 | A sixteen-bit signed integer | "%hd" |
nasd_uint16 | A sixteen-bit unsigned integer | "%hu" |
nasd_int32 | A thirty-two-bit signed integer | "%d" |
nasd_uint32 | A thirty-two-bit unsigned integer | "%u" |
nasd_int64 | A sixty-four-bit signed integer, printed base 10 | "%" NASD_64s_FMT |
nasd_uint64 | A sixty-four-bit unsigned integer, printed base 10 | "%" NASD_64u_FMT |
nasd_int64 | A sixty-four-bit signed integer, printed base 16 | "0x%" NASD_64x_FMT |
nasd_uint64 | A sixty-four-bit unsigned integer, printed base 16 | "0x%" NASD_64x_FMT |
nasd_thread_id_t | A thread identifier | "%" NASD_THREAD_ID_FMT |
nasd_identifier_t | A NASD object identifier | "0x%" NASD_ID_FMT |
![]() | ![]() | ![]() |
---|---|---|
Basic types | Results and errors | NASD Programmer's Documentation |