INPUTN Controls

BBj-Specific Information

For this topic's original documentation, see Numeric Edit (INPUTN) Controls.

In BBj, the INPUTN control:

  • Does not revert to an INPUTE control when the first character is alphabetic.

  • Cannot use an input mask containing a minus (-) sign, unless the minus sign is to the left of all numeric mask characters.

  • Cannot use clipboard operations (cut, copy, and paste are not supported).

  • Cannot highlight text for deletion in calculator mode.

  • Changes in character insertion: For digits to the left of the decimal point, the insertion/deletion cursor can only be placed immediately to the left of the decimal point. For digits to the right of the decimal point, the insertion/deletion cursor can only be placed immediately to the right of the rightmost character.

Input Mask Descriptions

The following is a list of special mask characters:

Mask Character

Description

0

A zero is always replaced by a digit (0..9).

#

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 (see SETOPTS Byte 4, Bit $04$ for more detail). Any other time it is replaced by a digit. (See SETOPTS in the Commands Manual 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.