Open System Services Library Calls Reference Manual (G06.28+, H06.05+)

vsnprintf(3) OSS Library Calls Reference Manual
Specifying a eld width with a 0 (zero) as a leading character causes the
eld width value to be padded with leading zeros.
o Accepts an integer (int) value and converts it to unsigned octal notation.
The precision species 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
eld width with a 0 (zero) as a leading character causes the eld width
value to be padded with leading zeros. An octal value for eld 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 species 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 eld width with a 0
(zero) as a leading character causes the eld width value to be padded
with leading zeros.
f Accepts a oat or double value and converts it to decimal notation in the
format [-]ddd.ddd. The number of digits after the radix character is
equal to the precision specication. If no precision is specied, six digits
are output. If the precision is 0 (zero), no radix character appears (unless
the # ag is specied). If a radix character is output, at least one digit is
output before it. The value is rounded to the appropriate number of
digits.
e or E Accepts a oat or double value and converts it to the exponential form
[-]d.ddde+/-dd. There is one digit before the radix character and the
number of digits after the readix character is equal to the precision
specication. If no precision is specied, six digits are output. If the pre-
cision is 0 (zero), no radix character appears (unless the # ag is
specied). The E conversion character produces a number with upper-
case E instead of lowercase e before the exponent. The exponent always
contains at least two digits. If the value is 0 (zero), the exponent is 0
(zero).
g or G Accepts a oat or double value and converts it in the style of the e, E,or
f conversion characters, with the precision specifying the number of
signicant digits. Trailing zeros are removed from the result. A radix
character appears only if it is followed by a digit (except that it always
appears if the # ag is specied). The style used depends on the value
converted. Style e (E,ifG is the ag used) results only if the exponent
resulting from the conversion is less than -4, or if it is greater or equal to
the precision.
c Accepts and prints an integer (int) value converted to an unsigned char.
C Accepts a wchar_t value, converts it to an array of bytes containing a
multibyte character, and prints it. If a minimum eld width is specied
and the multibyte character occupies fewer bytes than the specied
width, the multibyte character is padded with space characters to the
specied width.
782 Hewlett-Packard Company 527187-007