Chapter
10
I
BASIC
Keywords
PUT
Statement
PUT
[#lbuffr[,recordl
Puts
a
record
in
a
direct access disk file.
Buffer
is the number assigned
to
the file when you opened it.
The number sign
(#)
is optional. It is provided
for
compatibility
with other BASICs.
Record
is the record number you want
to
write to the file. It is
an integer in the range
1
to
16,777,215.
If you omit
record,
the
current record number is used.
If
record
is higher than the end-of-file record number, then
rec-
ord
becomes the new end-of-file record number.
The
first
time you use PUT after opening a file you must specify
the
record.
The
first
time you access
a
file via
a
particular buffer
the next record is set equal
to
one greater than the last record
accessed.
See Chapter
7,
“Disk Files,” for programming information.
Examples
PUT 1
writes the next record from Buffer
1
to
a
direct access file.
PUT 1
,25
writes Record
25
from Buffer
1
to
a
direct access file.
280