ISfci
5
f^-v
-K;,i;
J -80
MODEL
III
DISK
SYSTEM
In
Example
3,
when
input#
goes looking
for the
second
data item,
it
immediately encounters
a
terminator
(the
comma);
therefore, variable
B
is
given
the
value
zero.
The
following
table
shows
how
various data
images on
disk
will
be read by
the
statement:
INPUT«1 »A$»B$
Ex.#
Image on
disk
Values assigned
1
"ROBERTS
*
J,
"ROBERTS
»M,N
eof
A$:ROBERTS,J.
B$:ROBERTS,M.N.
2
ROBERTS
»J.»
ROBERTS
»M,N,
(ENTER)
A$:ROBERTS
B$:J.
3
THE WORD "QUO" ,12345,789
(ENTER)
A$:THE
WORD
"QUO"
B$:1
2345.789
4
BYTE©
(ENTER)
UNIT OF MEMORY
eof
A$:BYTE©ffWTER)
UNIT
OF
MEMORY
B$:nuII (eof error)
In
Example
3,
the
first
data
item
is
an unquoted
string,
therefore, the
double-
quotes
are
not terminators,
and
become
part
of
A$.
In
Example
4,
the (ENTER
)
is
preceded
by
an
©,
therefore
it
does not
terminate
the
first
string;
both
©
and
(ENTER
)
are
included
in a$.
LINE
INPUT#
Mead
a Line
of
Text
from
Disk
vst$
Is
the variable
name
to
contain
the
string cats.
Similar
to
line input
from
keyboard,
this
statement reads
a
"line" of
string
data
into
var$.
This
is
useful
when
you want
to
read
an
Ascii-format
basic
program
file
as data,
or
when
you want
to
read
in
data without following the
usual
restrictions
regarding leading characters
and
terminators.
130