Download Print this page

Radio Shack TRS-80 Owner's Manual page 154

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

Advertisement

an
Monci
in
rjs;-
s.
,
dtch
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
1,
IB
AS
CLIENT*(1)#
112 AS
HiSTtCI)
FIELD
I*
128 AS
DUMMY*
,
16
AS CI
JENT*(2
)
,
112 AS
HIST$(2)
In the
second field
statement,
dummy$
serves
to
move
the
starting
position
of
client$(2)
to
position 129. In
this
manner,
two
identical
"subrecords"
are
delned 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
CL$
(1)
HlST$
Ci)
16
CL$
(2)
112
HISIS
(2)
DUMMY$
GET
Mead
a
Record from
Disk— Random
Access
yip
Br?mm%mmmi)
fSf|fSl
:
:
»if::1
feiii:fc
:
|if:ig
•lief.
W8XBH
lltliffSit:
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"
,ntnexpl filespec
is
required before
the statement:
get nmexpl
,
nmexpl
get
tells
basic
to
read record
nmexpl
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

This manual is also suitable for:

Model iii