inputnull Statement

The inputnull statement is used with the input @ statement to define the character used to indicate a null input on subsequent input statements.

Syntax

inputnull ’character

Parameter(s)

character

Character to define as the indicator of null input for subsequent input statements. Only single character inputs are accepted.

Description

The inputnull must precede the affected input @ statement. Only one inputnull statement is active at any one time. If there is an inputtrap active for the same character, the inputnull has precedence.

Example(s)

The input @ statement requires a numeric value for string. An x, although not numeric, is accepted as a null input.

string=’’

inputnull ’x’

input @(10,10):string,50 "mr%3"

if string=’’ then stop

Even though the inputtrap reads x as an active value, the inputnull overrides. x does not terminate this program.

string=’’

inputtrap ’x?!’ gosub statement.label1,statement.label2,statement.label3

loop

inputnull ’x’

input @(3,5):string,20 "mr#4"

while string=’’ do repeat

See Also

if Statement, ifr Statement, input Statement, inputerr Statement, inputtrap...gosub Statement, inputtrap...goto Statement, Logical Expressions, not() Function, Statements and Functions, then Clause, then/else Statement Blocks