Download Print this page

Radio Shack TRS-80 Owner's Manual page 144

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

Advertisement

3-80
MODEL
Hi
DISK
SYSTEM
INPUT#
Sequential
Mead
from
Disk
"#
nmexp,
var\,var,
.
.]
wl'seic
rrnsx^i
spsr.ififci
••
ssq»je:>tial
hipuiiiie
iwfiei.
nmexp-
1.2, ...,15.
raris {hs vsnabft; ngine
)o
contain the dais
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
CEiTEH) (a
carriage return)
is
preceded
by
©
(a line feed),
the (ENTER)
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
©
character
from
the
keyboard,
press
the
down-arrow
character.
To
enter the
(
ENTER) character, press
(ENTER)
.)
This exception
applies
to
all
cases
noted
below where
(ENTER)
is
said
to
be
a
terminator.
126

Advertisement

loading

This manual is also suitable for:

Model iii