MPE/iX Intrinsics Reference Manual (32650-90875)

Chapter 9 521
Command Definitions (MAIL-PUTJCW)
NLCONVNUM
3 Invalid length specified (
inlength
or
outlength
)
4 Invalid number specified (
instring
)
5 *NLS internal error
6 *NLS internal error
7 Truncation occurred (
outstring
partially formatted)
8 Invalid
numspec
parameter
9 Invalid
fmtmask
parameter
* Do not apply to calls with
langnum
equal to 0 (NATIVE3000/XL).
numspec
16-bit unsigned integer by value (optional)
Returns a byte array from NLNUMSPEC, containing format information. If
this parameter is present,
langnum
is ignored and performance is
improved (refer to NLNUMSPEC).
fmtmask
16-bit unsigned integer by value (optional)
Specifies how to format the number. The default value is 0 and indicates
substitution only.
Bits Value/Meaning
15:1 0 Convert thousands separators
1 Strip thousands separators
14:1 0 Convert
decimal separators
1 Strip
decimal separators
13:1 0
Any character can be in
instring
(no validation as a number
is performed)
1 Number contained in
instring
(no validation as a number is
performed)
0:13 Reserved for the operating system
decimals
16-bit unsigned integer by value (optional)
If
fmtmask
bit 13 is set to 1,
decimals
returns the number of decimal
places in the input number.
Operation Notes
Split-stack calls are not permitted.
This intrinsic either:
Converts a native language formatted number to an ASCII number with the
NATIVE-3000 decimal separator (.) and thousands separator (,) for use in further
conversion to INTEGER, REAL, and so on.
Converts the decimal and thousands separators, or strips them (see
fmtmask
), to the
NATIVE-3000 equivalent.