TRS-80
MODEL
III
DISK
SYSTEM
CHARACTERS
ON
THE RIGHT ARE IGNORED* LSET
IS
A
LEFT-
JUSTIFY FUNCTION/'
Line 120
left-justifies
the
value
in
quotes
into the
first
field in
buffer
1.
Line 130
does
the
same
thing
to
its
quoted
string.
Note: rset
would
place
filler-blanks to the
left
of
the item.
Truncation
would
still
be
on
the
right.
Now
that
the data
is
in
the buffer,
we
can
write
it
to
disk with a
simple
put
statement:
140 PUT
1
,1
150
CLOSE
This
writes the
first
record
into the
file
glossary/bas.
To
read
and
print the
first
record
in
glossary/bas,
use
the
following sequence:
1S0
OPENTV"
t
it
"GLOSSARY/BAS"
170
FIELD
It
IS
AS
ND$
#
240 AS HEANING*
180
GET
1
,1
1S0
PRINT
MD$:
PRINT MEANING*
200 CLOSE
Line 160
and 170
are
required only
because
we
closed
the
file
in line
150.
If
we
hadn't closed
it,
we
could
go
directly to
line
180.
152