Repository navigation
dos_strformatcurrency
Formats a number as a currency string.
Currency string is formatted based on the currency settings identified in the Regional and Language Options found in Control Panel unless one of the overrides is specified.
(dos_strformatcurrency number [num_digits [leading_zero [decimal_sep [thousands_sep [currency_sym]]]]])
number
A number as a currency string.
num_digits
Number of fractional digits for the monetary format. Value must be number between 0 and 9.
leading_zero
Specifier for leading zeros in decimal fields. Value must be either 0 or 1.
decimal_sep
Character(s) used as the monetary decimal separator. Maximum number of characters is 4.
thousands_sep
Character(s) used as the monetary thousands separator. Maximum number of characters is 4.
currency_sym
String used as the monetary symbol. Maximum number of characters is 6.
The formatted currency string if successful.
nil on error.
Command: (dos_strformatcurrency 1234.56)
"$1,234.56"
Command: (dos_strformatcurrency 1234.56 0)
"$1,235"
Command: (dos_strformatcurrency 0.56 2 0)
"$.56"