Download Print this page

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

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

Advertisement

H
TRS-80
MODEL
III
DISK
SYSTEM
Often
you'll
want
to
use a
dummy
variable
in
a
field statement
to
"pass
over"
a portion
of
the buffer
and
start
fielding
it
somewhere
in
the
middle.
For example:
FIELD
It
1G
AS
CLIENT$(l)t
112 AS
HIST*<1>
FIELD
it
128 AS
DUMMY**
1G
AS
CLIENT$(2),
112 AS
HIST$(2)
In the
second field
statement,
dummys
serves
to
move
the
starting
position
of
client$(2)
to
position 129. In
this
manner, two
identical
"subrecords"
are
defined
on
buffer
number
1
.
We
won't
actually
use
dummy$
to
place data
into
the
buffer or
retrieve
it
from
the
buffer.
The
buffer
now
looks
like
this:
16
112
16
112
CL$
d)
HIST$
(D
CL$
(2)
HIST$
(2)
DUMMY$
GET
Read
a
Record from
Disk-
Random
Access
get
mexpti;!imxp2i
'
into^
15.
nmexp2
specifies
which
record
to
get
in
the
lite;
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
u
R" ,nmexpl
filespec
is
required before
the statement:
get nmexpl
y
nmexp2
get
tells
basic
to
read record
nmexp2
from
the
file
and
place
it
into
the
nmexpl
buffer.
If
you
omit
the
record
number
in
get, basic
will
read
the current record.
136

Advertisement

loading