|
Format Numbers - Reference
Frequently you want a number to appear in a certain format.
The most commands requests are for a set total number of digits and a set number of digits
to the right of the decimal place. Less frequently there is a call for negative amounts
displayed in parenthesis or that there should be leading zeros.
The FormatNumber function takes the contents of a number type
variable and returns the contents in the specified format.
Syntax: FormatNumber(expression, iDigits, bleadingDigit,
bParen, bGroupDigits)
| argument |
meaning |
| expression |
the variable holding the raw number |
| iDigits |
number of digits to right of decimal point |
| bleadingDigit |
1 for leading zeros
0 for no leading zeros |
| bParen |
1 for parenthesis around negative numbers
0 for no parenthesis around negative numbers |
| bGroupDigits |
1 to display numbers as per regional settings in the Control
Panel
0 to over-ride settings in the Control Panel |
|