PUT
For example, suppose
A$
= "LUDWIG",
B$
= "VON", and C$ =
"BEETHOVEN". Then
the
statement
PRINT#
1,
USING"
I, I,
\£'i£'i\"
;A$;B$;C$
would write the data
in
nickname form:
L,V,BEET
(In
this case,
we
didn't want to add any explicit delimiters.) See
PRINT USING for more information
on
the USING option.
IPUT
buffer
[,record]
Statement I
Puts a record
in
a direct-access disk file.
Buffer
is
the same buffer used
to
OPEN the file.
Record
is
the record number
you
want
to
PUT into the file.
It
is
an
integer between 1
and
65535.
If
omitted, the current record number
is
used.
This statement moves data from the buffer of a file into a specified
place
in
the file.
If
record
is
higher than the end-of-file record number, then record
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. (The next record
is
the record whose
number
is
one greater than the last record accessed).
See the chapter
on
"Disk Files" for programming information.
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.
2-147