Command INPUT Foundation
Assigns the value of an input expression to a variable.
INPUT [<SayExpression>] TO <VarName>
The command INPUT allows keyboard input of characters and assigns the value of the input expression to a variable. It is a simple input routine which first outputs the control characters carriage-return line-feed (Chr(13)+Chr(10)) so the cursor appears at the beginning of the screen row. <SayExpression> is then displayed and the command waits for keyboard input by the user.
The input characters are compiled using the macro operator and the resulting value is assigned to the variable <VarName> after the Return key is pressed. This key is the only one which can be used to terminate input. The Esc key is not supported. Only backspace and the left/right arrow keys are supported as editing keys.
Any number of characters can be input. When the cursor reaches the right screen margin, it wraps to the start of the following row. If the input characters cannot be compiled with the macro operator, a runtime error occurs.
The command INPUT exists only for compatibility reasons. User input should be performed using @...SAY or @...GET instead of INPUT.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.