Was this helpful?
Special Numeric Template Characters
The special template characters and the actions they specify are as follows:
n
If a digit in the number corresponds to the position of n, displays or accepts the digit. If no digits remain, displays or enters zero (0) to the left of the preceding character. If a field is specified without n in the numeric positions and a value of zero (0) is encountered, enters blanks in the field.
z
If a digit in the number corresponds to the position of z, displays or accepts the digit. If no digits remain, displays or enters a space to the left of the preceding character. This is used for standard blank‑padded numeric fields.
^
(Caret) Displays a digit if the number contains a digit in that position, but rounds up the digit according to the values of the digits to the right of this position.
$
(Dollar sign) If a digit in the number corresponds to the position of a dollar sign, displays or accepts the digit. If no digits remain, displays a floating dollar sign immediately to the left of the last evaluated digit. A dollar sign displays only once in the output field. If a dollar sign has been displayed in a previous position, a space is displayed in this position. This can be used either to place a dollar sign directly to the left of the number, or to place a dollar sign in a fixed position in the field when used with other template characters.
(Minus sign—preceding or trailing)
For preceding: If a digit in the number corresponds to the position of a minus sign, displays or accepts the digit. If no digits remain and the number is negative, a floating minus sign displays immediately to the left of the last evaluated digit. A minus sign displays only once in the output field. If a minus sign has already been displayed in a previous position, or if the number is positive and no digits remain, a space displays in that position.
For trailing: Displays a minus sign in this position if the number is negative; displays a space if the number is positive.
+
(Plus sign—preceding or trailing)
For preceding: If a digit in the number corresponds to the position of a plus sign, displays or accepts the digit. If no digits remain, displays a floating sign (+ or ‑) to the left of the last evaluated digit. A plus or minus sign displays only once in the output field. If a sign has already been displayed in a previous position, a space displays in that position.
For trailing: Displays a plus sign in this position if the number is negative; displays a space if the number is positive.
,
(Comma) Displays a comma if the number contains any digits to the left of this position. If no digits remain, displays a space. This is used for inserting commas to break up large numbers.
.
(Decimal Point) Displays or accepts a decimal point in this position. The template can contain only one decimal point.
*
(Asterisk) If no digits remain, displays an asterisk. This is useful to fill a number on the left with asterisks (for example, for checks).
space
Displays a blank space in this position. This is identical to specifying a backslash followed by a space, and is provided for convenience only. Do not use spaces as thousands separators in place of commas and a decimal point if your template contains floating characters (+ ‑ $ [ ] ( ) < > { }). Floating characters work correctly only when a comma and the decimal point are used as separators.
\c
(Backslash) Displays in the specified position any character c preceded by a backslash. This allows you to insert hyphens, slashes, or other characters into the number. (The backslash itself is not displayed.)
CR
(Two characters) If the number is negative, inserts the characters CR (for credit). If positive, displays two blanks. You can specify the characters in either uppercase or lowercase (or one of each).
DB
(Two characters) If the number is negative, inserts the characters DB (for debit). If positive, displays two blanks. You can specify the characters in either uppercase or lowercase (or one of each).
( ) , [ ] , < >
(Parentheses, brackets, or angle brackets) If the number is negative, displays it within the specified symbol.
Last modified date: 11/28/2023