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

vsnprintf(3) OSS Library Calls Reference Manual
the range from 1 to NL_ARGMAX. Conversion is then applied to the specied argu-
ment, rather than to the next unused argument. This feature provides for the denition of
format strings in an order appropriate to specic languages. When variable ordering is
used, the * (asterisk) specication for eld width in precision is replaced by %digit$.If
the variable ordering feature is used, it must be specied for all conversions.
Zero or more ags that modify the meaning of the conversion specication. The ag
characters and their meanings are as follows:
- Left align within the eld the result of the conversion.
+ Begin the result of a signed conversion with a sign (+ or -).
(space) Prex a space character to the result if the rst character of a signed
conversion is not a sign. If both the (space) and + ags appear, the
(space) ag is ignored.
# Convert the value to an alternate form. For o conversion, it increases the
precision to force the rst digit of the result to be a 0 (zero). For x and X
conversions, a nonzero result has 0x or 0X prexed to it. For e, E, f, g,
and G conversions, the result always contains a radix character, even if
no digits follow it. For g and G conversions, trailing zeros are not
removed from the result. For c, C, d, i, s, S, and u conversions, the ag
has no effect.
0 Pad to eld width using leading zeros (following any indication of sign
or base) for d, e, E, f, g,,i, o, u, x, and X conversions; no space padding
is performed. If the 0 and - (dash) ags both appear, the 0 ag will be
ignored. For d, i, ou, x, and X conversions, if a precision is specied,
the 0 ag is also ignored. For other conversions, the behavior is
undened.
An optional decimal digit string that species the minimum eld width. If the converted
value has fewer characters than the eld width, the eld is padded on the left to the
length specied by the eld width. If the left-adjustment ag is specied, the eld is pad-
ded on the right.
A eld width can be indicated by an * (asterisk) instead of a digit string. In this case, an
integer (int) value parameter supplies the eld width. The value parameter converted for
output is not fetched until the conversion letter is reached, so the parameters specifying
eld width or precision must appear before the value (if any) to be converted. If the
corresponding parameter has a negative value, it is treated as a - (dash) left alignment
option followed by a positive eld width. When variable ordering with the Ldigit$ for-
mat is used, the * (asterisk) specication for eld width in precision is replaced by
*digit$.
An optional precision. The precision is a . (dot) followed by a decimal digit string. If no
precision is given, it is treated as 0 (zero). The precision species:
The minimum number of digits to appear for the d, u, o, x,orX conversions.
The number of digits to appear after the radix character for the e, E, and f
conversions.
780 Hewlett-Packard Company 527187-007