Toshiba KB-80 Computer Keyboard User Manual


 
- 36 -
INPUT
Function Reads a numeric value or a character from the keyboard, and assigns it to a variable.
Format INPUT [;] [” <prompt statement> ” ; ] <variable> [, <variable> ] ···
Term <prompt statement>: A character string which is output on the screen when the
input is performed
(It is used to make it easy to understand the numeric value or
character to be input.)
<variable>: The numeric or character variable to which the input data is assigned
Explanation When the INPUT statement is executed, the prompt statement is displayed on the
screen, and the program waits for the input from the keyboard. If a semicolon (;)
follows <prompt statement>, a question mark (?) is displayed after <prompt
statement>. If a comma (,) is used instead of the semicolon (;), the question mark (?)
is not displayed.
The input from the keyboard is entered by pressing the [ENTER] key, and the
execution proceeds to the next statement. Until the [ENTER] key is pressed, the
numeric value or character string which is input and displayed can be modified.
If only the [ENTER] key is pressed when there is one <variable> in the INPUT
statement, it is interpreted as a no entry or a null string, and then it is assigned to
<variable>.
For the key entries, refer to “KEY ENTRY CODE LIST”.