Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
OSS Library Calls (s) sprintf(3)
—AnL followed by an n conversion specifier indicates that the argument will be
treated as a pointer to a long long int.
—At followed by a d, i, o, u, x,orX conversion specifier indicates that the argu-
ment will be treated as a ptrdiff_t or the corresponding unsigned integer type
argument.
—At followed by an n conversion specifier indicates that the argument will be
treated as a pointer to a ptrdiff_t.
—Az followed by a d, i, o, u, x,orX conversion specifier indicates that the argu-
ment will be treated as a size_t or the corresponding signed integer type argu-
ment.
—Az followed by an n conversion specifier indicates that the argument will be
treated as a pointer to a signed integer type corresponding to the size_t argu-
ment.
• A character that indicates the type of conversion to be applied:
% Performs no conversion. Prints %.
d or i Accepts an integer (int) value and converts it to signed decimal notation.
The precision specifies the minimum number of digits to appear. If the
value being converted can be represented in fewer digits, it is expanded
with leading zeros. The default precision is 1. The result of converting a
0 (zero) value with a precision of 0 (zero) is a null string. Specifying a
field width with a 0 (zero) as a leading character causes the field width
value to be padded with leading zeros.
u Accepts an integer (int) value and converts it to unsigned decimal nota-
tion. The precision specifies the minimum number of digits to appear. If
the value being converted can be represented in fewer digits, it is
expanded with leading zeros. The default precision is 1. The result of
converting a 0 (zero) value with a precision of 0 (zero) is a null string.
Specifying a field width with a 0 (zero) as a leading character causes the
field width value to be padded with leading zeros.
o Accepts an integer (int) value and converts it to unsigned octal notation.
The precision specifies the minimum number of digits to appear. If the
value being converted can be represented in fewer digits, it is expanded
with leading zeros. The default precision is 1. The result of converting a
0 (zero) value with a precision of 0 (zero) is a null string. Specifying a
field width with a 0 (zero) as a leading character causes the field width
value to be padded with leading zeros. An octal value for field width is
not implied.
x or X Accepts an integer (int) value and converts it to unsigned hexadecimal
notation. The letters abcdef are used for the x conversion
and
the letters
ABCDEF are used for the X conversion. The precision specifies the
minimum number of digits to appear. If the value being converted can
be represented in fewer digits, it is expanded with leading zeros. The
default precision is 1. The result of converting a 0 (zero) value with a
precision of 0 (zero) is a null string. Specifying a field width with a 0
(zero) as a leading character causes the field width value to be padded
with leading zeros.
527187-017 Hewlett-Packard Company 6−85