# 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](https://d3codex.com/pickbasic-flashbasic/if-statement/)
- [ifr statement](https://d3codex.com/pickbasic-flashbasic/ifr-statement/)
- [input statement](https://d3codex.com/pickbasic-flashbasic/input-statement/)
- [inputerr statement](https://d3codex.com/pickbasic-flashbasic/inputerr-statement/)
- [inputtrap...gosub statement](https://d3codex.com/pickbasic-flashbasic/inputtrap-gosub-statement/)
- [inputtrap...goto statement](https://d3codex.com/pickbasic-flashbasic/inputtrap-goto-statement/)
- [Logical expressions](https://d3codex.com/pickbasic-flashbasic/logical-expressions/)
- [not() function](https://d3codex.com/pickbasic-flashbasic/not-function/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [then clause](https://d3codex.com/pickbasic-flashbasic/then-clause/)
- [then/else statement blocks](https://d3codex.com/pickbasic-flashbasic/then-else-statement-blocks/)

---
Source: https://d3codex.com/pickbasic-flashbasic/inputnull-statement/ - part of the D3Codex reference.
