printf.3s (2010 09)

p
printf(3S) printf(3S)
an optional hh specifying that a following
n conversion specifier applies to a pointer to a
signed char argument
an optional
hL specifying that a following
a, e, f,org conversion wide-character applies
to a type
extended which is the 80-bit IEEE-754 double-extended type in the Itanium
architecture
an optional
j specifying that a following
d, i, o, u, x or X conversion specifier applies to
an intmax_t or uintmax_t argument
an optional
j specifying that a following
n conversion specifier applies to a pointer to an
intmax_t argument
an optional
l (the letter "ell"), specifying that a following
d, i, o, u,
x,orX conversion
character applies to a long integer arg
an optional
l specifying that a following
n conversion character applies to a pointer to a
long integer arg
an optional
L specifying that a following
a, A, e, E, f, F, g,orG
conversion character
applies to a long double
an optional
ll specifying that a following
d, i, o, u, x,orX conversion character applies
to a long long integer arg
an optional
t specifying that a following d, i, o, u, x
or X conversion specifier applies to
a ptrdiff_t or the corresponding unsigned type argument
an optional
t specifying that a following n conversion specifier applies to a pointer to a
ptrdiff_t argument
an optional
z specifying that a following d, i, o, u, x
or X conversion specifier applies to
a size_t argument or the corresponding signed integer type argument
an optional
z specifying that a following n conversion specifier applies to a pointer to a
size_t argument arg.
For Itanium(R)-based systems if the optional decimal floating point feature is installed and
enabled, the following optional character specifications are allowed:
an optional
H specifying that a following f, F, e, E,
g, G, a,or A conversion specifier
applies to a
_Decimal32 argument.
an optional
D specifying that a following f, F, e, E,
g, G, a,or A conversion specifier
applies to a
_Decimal64 argument.
an optional
DD specifying that a following f, F, e, E,
g, G, a,or A conversion specifier
applies to a
_Decimal128 argument.
5. An
h, hh, j, l, L, ll, t
,orz before any other conversion character is ignored.
6. A conversion character that indicates the type of conversion to be applied.
A field width or precision can be indicated by an asterisk instead of a digit string. In this case, an integer
arg supplies the field width or precision. The arg that is actually converted is not fetched until the
conversion letter is seen, so the args specifying field width, or precision, or both must appear in that
order before the arg, if any, to be converted. A negative field width is taken as a
- flag followed by a
positive field width. A negative precision is taken as if the precision were omitted. Format strings con-
taining %n$ conversion specifications can also indicate a field width or precision by the sequence *n$.
The n indicates the position of an integer arg. With the *n$ sequence, the args specifying field width or
precision can appear before or after the arg to be converted.
The flag characters and their meanings are:
The integer portion of the result of a decimal conversion (%i, %d, %u, %f, %F, %g, or %G)
will be formatted with thousands grouping characters. Thousands grouping and the
separator character are determined by the "grouping" and "thousands_sep" fields of the
LC_NUMERIC category respectively. (See localedef (4)). For other conversions the
behavior is undefined. The nonmonetary grouping character is used.
- The resulting conversion is left-justified within the field.
+ The resulting signed conversion always begins with a sign (+ or -).
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010