Radio Shack TRS-80 Trsdos & Disk Basic Reference Manual page 135

Micro computer system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

DISK BASIC
The
buffer
now
"looks"
like
this:
15
112
1
15
112
CL$
HIST$
X
(I)
(1)
<
DUMMY$
CL$
(2)
HIST$
(2)
Note
that
only
one byte
(the
128th
byte)
is
left
unused
in this
field
structure.
VjrlLl
(read a record
from
disk
random
access)
GET
nmexpl[,nmexp
2]
where
nmmexpl
specifies
a
random
access
file
buffer,
nmexpl=\,2,
.
.
.
,15
nmexp2
specifies
which
record
to
GET
in
the
file;
if
omitted, the current record
will
be
read.
This
statement
gets a
data record
from
a
disk
file
and
places
it
in
the
specified buffer.
Before
GETting
data
from
a
file,
you must open
the
file
and
assign a
buffer to
it.
That
is,
a
statement
like:
OPEN
"R",nmexpl,filespec
is
required before the statement:
GET
nmexpl,nmexp2
When BASIC
encounters the
GET
statement,
it
looks
at
the
buffer's
control block,
and
obtains:
the
information
needed
to access
the
file
the
mode
in
which
this
buffer
was
set
up
(must be R)
the current record
number
The
EOF
(end-of-file)
record
number,
i.e.,
the highest
numbered
record
in
the
file
lots
of other information
for internal
use
BASIC
then
reads
record
nmexp2
from
the
file
and
places
it
into the
buffer.
If
you
omit
the record
number,
it
will
read the current record.
The
"current record"
is
the record
whose number
is
one
higher
than
that
of the
last
record
accessed.
The
first
time
you
access a
file
via
a particular buffer,
the current record
is
set
equal to
1
7-49

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents