Download Print this page

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

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

Advertisement

TRS-80
MODEL
III
DISK
SYSTEM
INPUT#
Sequential
Read
from
Disk
where
nmexp
specifies
a sequential
input
file
buffer,
/?mexp=1,2,..,15.
var
is
the variable
name
to
contain the data
from
the
file.
This statement
inputs data
from
a disk
file.
The
data
is
input
sequentially.
That
is,
when
the
file is first
opened,
a pointer
is
set to
the
beginning of
the
file.
Each
time
data
is
input, the
pointer advances.
To
start
over reading
from
the
beginning of
the
file,
you must
close the
file
and
re-open
it.
input#
doesn't care
how
the data
was
placed
on
the disk
whether
a single
print#
statement put
it
there,
or
whether
it
required 10
different
print#
statements.
What
matters
to
input#
are the positions
of
the
terminating
characters
and
the
eof
marker.
To input#
data successfully
from
disk,
you
need
to
know
ahead of time
what
the
format of
the
data
is.
Here
is
a description
of
how
input#
interprets the
various characters
it
encounters
when
reading
data.
When
inputting data
into a variable,
basic
ignores leading blanks;
when
the
first
non-blank
character
is
encountered, basic
assumes
it
has
encountered
the
beginning of
the
data item.
The
data
item ends
when
a terminating character
is
encountered
or
when
a
terminating condition occurs.
The
particular
terminating characters
vary,
depending on whether basic
is
inputting
to
a
numeric
or
string variable.
Special
Note
Here's
an important exception
to
keep
in
mind
in
reading
the
following
material.
When
(ENTER) (a
carriage return)
is
preceded by
©
(a line
feed), the CENTER)
is
not taken
as
a terminator. Instead,
it
becomes
a part
of
the
data
item
(string
variable) or
is
simply ignored (numeric
variable).
(To
enter the
£)
ch
aracter
from
the
keyboard,
press the
down-arrow
character.
To
enter the
(ENTER) character,
press
(INTER)
.)
This exception
applies
to
all
cases
noted
below where
(ENTER)
is
said to
be
a
terminator.
126

Advertisement

loading