The pound sign is used to suppress leading zeroes. It is replaced by the fill character for leading zeroes to the left of the decimal point. For trailing zeros to the right of the decimal point it is replaced by a space or a zero. Any other time it is replaced by a digit. See SETOPTS byte 4, bit $04$ for more information.
,
To the left of the decimal point, the comma is replaced by the fill character if no digits have yet been placed. Any other time, it results in a comma.
-
The minus sign creates a "-" in the result if the number is negative; otherwise, it is replaced by the fill character.
+
The plus sign becomes a "+" in the result if the number is positive, or a "-" if the number is negative.
$
The dollar sign always results in a dollar sign.
(
A left parenthesis results in a "(" if the number is negative, or the fill character if positive.
)
A right parenthesis results in a ")" if the number is negative, or the fill character if positive.
CR
The characters "CR" are inserted into the number if the number is negative. Two spaces are inserted if the number is positive.
DR
The characters "CR" are inserted into the number if the number is negative. The characters "DR" are inserted if the number is positive.
*
The asterisk ("*") is inserted into the number.
.
The decimal point is replaced by a decimal point if any digits appear in the output mask. Otherwise, it is replaced by the fill character. After the decimal point, the fill character becomes a space.
B
The upper case "B" always becomes a space. Any other character is simply copied to the result.
@
The @ sign is replaced by the three-character international currency code, based on the current value of STBL("!LOCALE").
&
The & sign is replaced by the local currency symbol, based on the current value of STBL("!LOCALE").
Some of the above characters can float within the mask. These are "-", "+", "$", "@", "&" and "(". If any of these characters is present in the mask, the first one encountered will be moved to the last position where a "#" or "," was replaced by the fill character. If no such position exists, the float character is left where it is.
String Masking
Char
Accepts
X
Any printable character.
a
Any alphabetic character.
A
Any alphabetic character. Converts lower-case alphabetic characters to upper case.
0
Any digit.
U
Any digit, alphabetic, space, or punctuation character. Converts lower-case alphabetic characters to upper case.
z
Any digit or alphabetic character.
Z
Any digit or alphabetic character. Converts lowercase alphabetic characters to upper case.