s$ = FormatNumber(n[, decimals, point$, thousands$])
n to a string, separating
the digits by the thousands and clipping the decimal places to the number
passed in the decimals argument. You can also pass the character that
should be used as a decimal separator in point$ and the character that
should be used as a thousands separator in thousands$. This makes FormatNumber()
suitable for locale-sensitive number formatting. You can use the GetLocaleInfo()
function to get the decimal point and thousand separator character for the
current locale. See GetLocaleInfo for details.
t = GetLocaleInfo() s$ = FormatNumber(1234567.89, 2, t.DecimalPoint, t.ThousandSeparator) DebugPrint(s$)The code above will convert 1234567.89 to a string using the current locale's decimal point and thousand separator.