Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)

Guardian Native C Library Calls (s) strfmon(3)
ag is ignored unless a left precision is specied.
^ The ˆ (circumex) ag suppresses grouping digits when formatting the
currency amount. The default is to group the digits and separate them with the
grouping characters if dened for the current locale.
+ The + (plus) character species that the locales equivalent of + and - are used
to indicate positive and negative values. You cannot specify both the + (plus)
character and the ( (left-parenthesis) character. If you specify neither, the
locales default method for displaying positive and negative values is used.
( The ( (left-parenthesis) character speci
es that the locales equivalent of
enclosing negative amounts within parentheses is used to indicate positive and
negative values.
! The ! (exclamation mark) character suppresses the currency symbol from the
output conversion.
- The - (hyphen) character species that the eld is left justied within the
minimum eld width rather than right justied. This ag is ignored unless a
minimum eld width is specied.
An optional decimal digit string w that species a minimum eld width in which the
result of the conversion is right justied. If the - (hyphen) ag is specied, the result is
left justied.
An optional left-precision consisting of a # (number sign) followed by a decimal digit
string n. The decimal digit string species the maximum number of digits to be formatted
to the left of the radix character. This option causes an amount to be formatted as if it
has the number of digits specied by the n digit string. If more than n digit positions are
required, this option is ignored. Digit positions in excess of those required are lled with
the numeric ll character set with the =f ag. This option can be specied to keep the
formatted output from multiple calls to the strfmon() function aligned in the same
columns. It can also be used in conjunction with the =f ag to ll unused positions with a
special character, (for example, #***123.45).
If grouping is dened for the current locale and has not been suppressed with the ˆ
(circumex) ag, grouping is applied to the combined ll characters plus the regular
digits. Grouping separators are not applied to ll characters even if the ll character is a
digit (for example. $00001,234.56 and $****1,234.56).
An optional right precision consisting of a . (period) followed by a decimal digit string p
that species the number of digits after the radix character. If the value of the p digit
string is 0 (zero), no radix character is used. If a right precision is not specied, a default
specied by the current locale is used. The amount being formatted is rounded to the
specied number of digits prior to formatting.
A character that indicates the type of conversion to be applied:
% No parameter is converted; the conversion specication %% (double percent
sign) produces a single % in the output string.
i The double parameter is formatted according to the current locales interna-
tional currency format; for example, in a U.S. locale: USD 1,234.56.
n The double parameter is formatted according to the current locales national
currency format; for example, in a U.S. locale: $1,234.56.
527192-005 Hewlett-Packard Company 657