Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
Guardian Native C Library Calls (s) strfmon(3)
flag is ignored unless a left precision is specified.
^ The ˆ (circumflex) flag suppresses grouping digits when formatting the
currency amount. The default is to group the digits and separate them with the
grouping characters if defined for the current locale.
+ The + (plus) character specifies that the locale’s 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
locale’s default method for displaying positive and negative values is used.
( The ( (left-parenthesis) character speci
fies that the locale’s 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 specifies that the field is left justified within the
minimum field width rather than right justified. This flag is ignored unless a
minimum field width is specified.
• An optional decimal digit string w that specifies a minimum field width in which the
result of the conversion is right justified. If the - (hyphen) flag is specified, the result is
left justified.
• An optional left-precision consisting of a # (number sign) followed by a decimal digit
string n. The decimal digit string specifies 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 specified 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 filled with
the numeric fill character set with the =f flag. This option can be specified 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 flag to fill unused positions with a
special character, (for example, #***123.45).
If grouping is defined for the current locale and has not been suppressed with the ˆ
(circumflex) flag, grouping is applied to the combined fill characters plus the regular
digits. Grouping separators are not applied to fill characters even if the fill 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 specifies 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 specified, a default
specified by the current locale is used. The amount being formatted is rounded to the
specified number of digits prior to formatting.
• A character that indicates the type of conversion to be applied:
% No parameter is converted; the conversion specification %% (double percent
sign) produces a single % in the output string.
i The double parameter is formatted according to the current locale’s 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 locale’s national
currency format; for example, in a U.S. locale: $1,234.56.
527192-005 Hewlett-Packard Company 6−57