Download Print this page

Radio Shack TRS-80 model III Owner's Manual page 131

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

Advertisement

\i
TRS-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:
IIMPUT#i
,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
BYTElsJ
(ENTER)
UNIT
OF
MEMORY
eof
A$:BY
I
h(*J(ENTER)
UNIT
OF
MEMORY
B$:null (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
preced ed
by
an
©,
therefore
it
does
not terminate
the
first
string;
both
©
and
(ENTER] are
included
in a$.
LINE
INPUT#
Read
a Line
of
Text
from
Disk
line
mm#timxft,
vart
where
nmexp
specifies
a sequential output
file
buffer,
/miarp=1,2,...,15,
^
the
string
data.
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 Ascn-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

Advertisement

loading