Quote:
Currency Formatting
This sample includes a function that receives parameters for value,
number of decimal places, and the character to use as a separator
in the great-than-zero part of the number, for instance, commas in
“1,000,000.00”. If no separator character is specified (comma is default),
none will be used. If no places are specified, or places is specifed as zero,
the number will be a rounded integer. This example uses input textfields
for allowing the user to specify the values, but the function has also been
built to accept actual numeric values, and includes error trapping.
Function includes verbose commenting.