HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)

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.
5. An h, hh, j, l, L, ll, t,or
z 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 conver-
sion 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 containing
%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 -).
blank If the first character of a signed conversion is not a sign, a blank is prefixed to the result.
This implies that if the blank and + flags both appear, the blank flag is ignored.
# This flag specifies that the value is converted to an "alternate form". For c
, d, i, s, n, and
u conversions, the flag has no effect. For o conversion, it increases the precision to force
the first digit of the result to be a zero. For x or X conversion, a nonzero result is prefixed
by 0x or 0X.Forap conversion, a nonzero result is prefixed by 0x.Fora, A, e, E, f, F,
g, and G conversions, the result always contains a radix character, even if no digits follow
the radix. (Normally, a radix character appears in the resulting conversions only if fol-
lowed by a digit). For g and G conversions, trailing zeros are not removed from the result
134 Hewlett-Packard Company 2 HP-UX 11i Version 3: February 2007