Download Print this page

Radio Shack TRS-80 Owner's Manual page 128

Mini-disk operation disk operating system disk basic programming language
Hide thumbs Also See for TRS-80:

Advertisement

LINE
INPUT
Input a Line
from Keyboard
line
input
"prompt"
;variabls
fj'ompi
is
a
promp*m§
messaye.
variable
is
\m
rmr.e
thai will
be assigned
to
the
line
you
type
in.
line input
(or
lineinput
the
space
is
optional)
is
similar to input, except:
*
The Computer
will
not display
a
question
mark when
waiting
for
your
operator's input.
Each
line
input
statement can
assign a value
to just
one
variable.
8
Commas
and quotes your
operator can use
as part
of
the string input.
*
Leading
blanks
are
not ignored
they
become
part
of
variable.
The
only
way
to
terminate
the
string
input
is
to
press
(ENTER)
.
line
input
is
a
convenient
way
to
input
string
data without
having
to
worry
about
accidental entry
of
delimiters
(commas,
quotation
marks,
colons,
etc.).
The
(ENTER)
key
serves
as the
only
delimiter.
If
you want anyone
to
be
able
to
input
information
into
your
program
without
special instructions,
use
the
line
input
statement.
Some
situations
require
that
you
input
commas,
quotes
and
leading blanks
as
part
of
the data,
line input
serves well
in
such
cases.
Examples
LINE INPUT
A*
Input
a$ without displaying
any prompt.
LINE INPUT "LAST NAME
>
FIRST NAME?
"
SN$
Displays
a
prompt message
and
inputs
data.
Commas
will
not terminate the
input
string,
as
they
would
in
an
input statement.
Sample Program
200 REM
CUSTOMER SURVEY
205
CLEAR
1000
207 PRINT
110

Advertisement

loading

This manual is also suitable for:

Model iii