Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

vsnprintf(3) OSS Library Calls Reference Manual
character % (percent sign) is replaced by %digit$, where digit is a decimal number in
the range from 1 to NL_ARGMAX. Conversion is then applied to the specified argu-
ment, rather than to the next unused argument. This feature provides for the definition of
format strings in an order appropriate to specific languages. When variable ordering is
used, the * (asterisk) specification for field width in precision is replaced by %digit$.If
the variable ordering feature is used, it must be specified for all conversions.
Zero or more flags that modify the meaning of the conversion specification. The flag
characters and their meanings are as follows:
Format the integer portion of the result of a decimal conversion (%i, %d,
%u, %f, %F, %g, or %G) with thousands’ grouping characters, using the
nonmonetary grouping character. For other conversions the behavior is
undefined.
- Left align within the field the result of the conversion.
+ Begin the result of a signed conversion with a sign (+ or -).
(space) Prefix a space character to the result if the first character of a signed
conversion is not a sign. If both the (space) and + flags appear, the
(space) flag is ignored.
# Convert the value to an alternate form. For o conversion, it increases the
precision to force the first digit of the result to be a 0 (zero). For x and X
conversions, a nonzero result has 0x or 0X prefixed 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 flag
has no effect.
0 Pad to field 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) flags both appear, the 0 flag will be
ignored. For d, i, ou, x, and X conversions, if a precision is specified,
the 0 flag is also ignored. For other conversions, the behavior is
undefined.
An optional decimal digit string that specifies the minimum field width. If the converted
value has fewer characters than the field width, the field is padded on the left to the
length specified by the field width. If the left-adjustment flag is specified, the field is pad-
ded on the right.
A field width can be indicated by an * (asterisk) instead of a digit string. In this case, an
integer (int) value parameter supplies the field width. The value parameter converted for
output is not fetched until the conversion letter is reached, so the parameters specifying
field 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 field width. When variable ordering with the Ldigit$ for-
mat is used, the * (asterisk) specification for field 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 specifies:
The minimum number of digits to appear for the d, u, o, x,orX conversions.
7122 Hewlett-Packard Company 527187-017