INPUTNULL Statement

Defines the character that, when input in response to an INPUT@ statement, causes a null value to be assigned to the INPUT@ variable.

Syntax

INPUTNULL {character}

Syntax Elements

character is a single character that, when entered, assigns a null value to the INPUT@ variable.

Operation

The INPUTNULL statement works only with the INPUT@ statement.

With the INPUT@ statement, a delimiter-only response will not null an already assigned input variable. The input variable remains unchanged. To null an assigned input variable requires the input of a defined null character.

The null character is defined by the INPUTNULL statement executed anywhere in the program prior to the INPUT@ statement.

If the character is not defined, the default character, an underscore (_), is used. If the INPUTNULL statement is executed without defining a character, the default character is assigned.

Example

VAR=ITEM<2,3,1>
INPUTNULL CHAR(27)
.
.
.
INPUT@(5,10): VAR

The ESC key is defined as the null character. At the INPUT@ statement, variable VAR is displayed at the prompt location and the user is prompted for input.

If the user enters RETURN, VAR is unchanged.

If the user enters a new value, it is assigned to VAR.

If the user enters ESC, the current value of VAR is nulled.