INPUT
INPUT
[input-prompt:] variable-list
(For
information
on
the
use
of
the
INPUT
statement
with
a file.
GCC
the "File Processing" section.)
This form
of
the
INPUT
statement
is used when entering
data
via
the keyboard.
The
INPUT
statement
causes the program to pause
until valid
data
is
entered from the keyboard. Although the
computer usually accepts up to one input line
(4
lines on your
screen) for each
INPUT
statement. a long list of values may be
rejected by the computer.
If
you receive the message "LINE
TOO
LONG" after entering
an
input line, you will need to divide the
lengthy
INPUT
statement
into
at
least two
separate
statements.
Entering the Input Statement
The
input-prompt is a string expression
that
indicates on the screen
the values you should
enter
at
that
time. Including an input-prompt
in
the
INPUT
statement
is
optional.
When
the
computer
performs
an
INPUT
statement
that
does not have
an
input-prompt, it
displays a question
mark
(?)
followed by a space
and
waits for you
to
enter
your
data.
If
you
uSe
an
input-prompt,
the
string
expression
must
be
followed
by
a colon, When the computer performs this type of
INPUT
statement,
it
will display the input-prompt message on the screen
and
wait
for
you
to
enter
your
data.
The
variable-list contains those variables which are assigned values
when the
INPUT
statement
is performed. Variable names in the
variable-list
are
separated
by
commas and may
be
numeric
and/or
string variables.
I1-S8
Examples:
>NEW
>100
INPUT
B
;;.110
PRINT
6
>120
END
>RUN
?
25
25
**
DONE
**
»N
EW
>100
INPUT
"COST
Of CAR?":B
>110 A$="TAX?"
»120
INPUT
I\$:C
>130
INPUT
"SALES "&A$:X
>140
PRINT
B;C;X
>150
END
RUN
COST
OF
CAR?SSOO
TAX?500
SALES
TAX?500
5500
500 500
**
DONE
**
>NEW
>100
INPUT
A,B$,C,D
>110
PRINT
A:8$:C:D
>120
END
RU
N
?
10,HELLO.25,3.2
10
HELLO
25
3.2
**
DONE
**
User's Reference Guide