DVARIANT.FormatNumbermethod
Formats a DVARIANT containing numbers into a string form.
Syntax
FUNCTION FormatNumber (BYVAL iNumDig AS LONG = -1, BYVAL ilncLead AS LONG = -2, BYVAL iUseParens AS LONG = -2, BYVAL iGroup AS LONG = -2, BYVAL dwFlags AS DWORD = 0) AS DWSTRING
Parameters
| Name | Description | |
|---|---|---|
iNumDig | The number of digits to pad to after the decimal point. Specify -1 to use the system default value. | |
ilncLead | Specifies whether to include the leading digit on numbers. -2 : Use the system default. -1 : Include the leading digit. 0 : Do not include the leading digit. | |
iUseParens | Specifies whether negative numbers should use parentheses. -2 : Use the system default. -1 : Use parentheses. 0 : Do not use parentheses. | |
iGroup | Specifies whether thousands should be grouped. For example 10,000 versus 10000. -2 : Use the system default. -1 : Group thousands. 0 : Do not group thousands. | |
dwFlags | VAR_CALENDAR_HIJRI is the only flag that can be set. |
Return value
A DWSTRING containing the formatted value.
Description
Formats a DVARIANT containing numbers into a string form.
Remarks
This function uses the user's default locale while calling VarTokenizeFormatString and VarFormatFromTokens.
Reference
- Include file
DVARIANT.INC - Defined in AfxNova/DVARIANT.inc:2353
- Documented in COM/DVARIANT Class.md
- Topic: DVARIANT Class