MPE/iX Intrinsics Reference Manual (32650-90875)

Chapter 9 537
Command Definitions (MAIL-PUTJCW)
NLFMTNUM
fmtmask
16-bit unsigned integer by value (optional)
Contains formatting specifications for the input. The default value is 0, a
simple substitution.
Bits Value/Meaning
15:1 Thousands separators:
0 Do not insert thousands separators
1 Insert thousands separators
14:1 Decimal separators:
0 Do not insert
decimal separators
1 Insert
decimal separators
13:1 Currency symbol/name:
0 Do not insert currency symbol/name
1 Insert currency symbol/name
11:2 Output justification:
0 Do not justify output
1 Left-justify output
2 Right-justify output
3 Left-justify output and return the formatted number
length in
outlength
0:11 Reserved for the operating system
decimals
16-bit signed integer by value (optional)
Specifies where to insert the decimal separator. The value is ignored if bit
14 of
fmtmask
is zero or if a decimal separator is present in the number.
Operation Notes
Split-stack calls are not permitted.
This intrinsic operates in substitution mode and formatting mode:
Substitution mode If
fmtmask
is omitted or has all bits set to zero, the substitution mode
substitutes the native equivalent for "." and ","; for ARABIC, it
substitutes the alternative set of digits for ASCII digits. The input is not
validated as a number and can contain several numbers. No justification
takes place, and the output is left-truncated if
outstring
is shorter than
instring
(for example, 1,234.56 becomes ,234.56).
Formatting mode If any bit 10-15 in
fmtmask
is set to one, the formatting performs the
substitution and formats the input according to
fmtmask
. In this mode,
input is validated as a number, and only ASCII digits and ".", ",",
"-", "+", and "$" are allowed. Only one sign and one "$" are allowed.