Input of values
INPUT [prompt$], variable
Input of a value by the user. If the string constant prompt is given, then this is print as prompt. The userinput is terminated by pressing the next key, the Enter key or ESC. The reason for termination is stored in the variable INPUTRC.
Input Return Code | |
0 | ENTER |
1 | NEXT |
2 | ESC |
In the normal mode, pressing ESC leads to an abort of the program. You need to switch error messages of to avoid this ( ERROROFF).
Example:
...
ERROROFF
INPUT "Your input:", s$
ERRORON
? "Your Input was:",s$," ReturnCode:",inputrc
... |
|