NLS Function: Returns a correctly formatted number string for the current locale.
Module: USE DFNLS
Syntax
Results:
The result is of type INTEGER(4). The result is the number of characters written to outstr (bytes are counted, not multibyte characters). If an error occurs, the result is one of the following negative values:
Compatibility
CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB
See Also: NLSFormatTime, NLSFormatCurrency, NLSFormatDate
Example
USE DFNLS
CHARACTER(40) str
INTEGER(4) i
i = NLSFormatNumber(str, "1.23")
print *, str ! prints 1.23
i = NLSFormatNumber(str, "1000000.99")
print *, str ! prints 1,000,000.99
i = NLSSetLocale("Spanish", "Spain")
i = NLSFormatNumber(str, "1.23")
print *, str ! prints 1,23
i = NLSFormatNumber(str, "1000000.99")
print *, str ! prints 1.000.000,99