Download Print this page

Radio Shack TRS-80 Owner's Manual page 155

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

Advertisement

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
For example:
Program
statement
Effect
1000
open"R",i,"name/bas"
Open
name/bas
for
random
access
using buffer
1
ioio
field
i,...
Structure buffer
1020
get
i
get
record
1
into
buffer
1
1025
REM...
ACCESS BUFFER
1030
get
1,30
get
record
30
into
buffer
1
1035
REM.
..ACCESS
BUFFER
1040
get
1,25
get
record
25
into
buffer
1
1046
REM...
ACCESS BUFFER
1050
geti
get
record
26
into
buffer
1
If
you
are
using variable-length records
(not fixed-length),
an attempt
to
get
past the
end
of
file
will
produce
an
error.
If
you
are
using
fixed-length records, the
same
attempt
will
return
a
null
record
and no
error will occur.
To
prevent
this
from
occurring,
you
can use
the
lof
function
to
determine
the
number
of
the
highest
numbered
record.
PUT
Write a
Record
to
Disk— Random
Access
pur
nmexpllnmsMfi^l
r;mexp2 spedf'e?
v.^
reca^c
;.iir;^:e' :;
K-
-
::~\6^j
% ::
.;•.•.:;
-;
yv;
assumed.
This statement
moves
data
from
a
file's
buffer
into
a specified
place
in
the
file.
Before
putting data
in
a
file,
you
must:
1
.
open
the
file,
thereby assigning
a buffer
and
defining the access
mode
(must
be
r);
137

Advertisement

loading

This manual is also suitable for:

Model iii