in BASIC ROM:
|List of all BASIC keywords|
Type: Command General Programming-Syntax: INPUT ["<text/string>";]<Variable>[,<Variable>...]
The BASIC-command INPUT is used to read data from the keyboard into one or more supplied variables. The INPUT command prints the optional text followed by a question mark (?) and then activates the screen editor for user input. User-entered data is stored in the supplied variables (type: string, floating point or integer) after the user presses the <RETURN>-key. If additional question marks are printed after the <RETURN>-key is pressed, it means the INPUT command is waiting for additional data for additional variables. Data is separated by commas for more than one input variable. If additional data is entered beyond the required variables, the BASIC-error "?EXTRA IGNORED" will be printed. Extra data is not stored. If the user presses <RETURN> without providing any data, the contents of the variables remains unchanged.
If the user supplies data that doesn't match the type of the supplied variables (for example, by providing alpha text for an integer variable) the BASIC-error "?REDO FROM START" will be displayed. That means, that the data must be inputed over again. To avoid this type of error, use string variables for all data types. In direct-mode INPUT results in the BASIC-error "?ILLEGAL DIRECT ERROR".
10 INPUT "First input, please "; A$ 20 INPUT "Only numbers (2-times) "; A1, A2% 40 PRINT: PRINT "Your input was: " A$, A1, A2% 50 PRINT: PRINT "Once again 3 numbers "; 60 INPUT A1%, B, Z 70 PRINT: PRINT "At last 3 inputs "; 80 INPUT A$, B$, C$ 90 PRINT: PRINT "Your last input was: "; A1%, B, Z, A%, B$, C$
POKE 19,1will disable printing the "?" and <RETURN>, until reset with
POKE 19,0. In this state, it will give a bad data error rather than Redo from start.