INPUT¶
Function¶
INPUT obtains a line of data from HUNTER’s keyboard
Syntax¶
INPUT[; ] [“prompt string”;] var1, var2, …var n
Examples¶
INPUT A
Inputs a numeric value from the keyboard and places it into the variable A.
INPUT"Parameters";A,B,C$
Inputs the values of A, B, C$ with the prompt message:
Parameters?
A comma following the prompt string suppresses the question mark prompt following the prompt string:
INPUT"Parameters",A,B,C$
will prompt:
Parameters
If no prompt message is required at all then the format entered is:
INPUT"",A
A semicolon prior to the prompt string will inhibit the echo of the users ‘Carriage Return’.
Remarks¶
Note that input lines are always terminated by pressing the ‘ENTER’ key.
INPUT cannot be used as a direct statement.
If INPUT’S argument is a simple variable and an invalid entry is made, INPUT will simply re-prompt without an error message.
An example is:
10 INPUT A
The user types ‘HELLO’. After ‘ENTER’, HUNTER re-prompts on the next line:
? re-do from start
?
and awaits a numerical entry.