put - write record from random buffer to random file
FileNum is the number under which the file was opened.
NumExpr is the record number for the record to be written.
If NumExpr is omitted, the next record number in sequence is assumed.
In the following example, the
statements in lines 30 through 50 place the information in a buffer.
statement in line 60 writes the buffer to the random
10 open "addrph" as #1 len = 150
20 field 1, 35 as n$, 80 as a$, 12 as ph$
30 lset n$ = "Basmark Corporation"
40 lset a$ = "1717 East Ninth Street, Cleveland, Ohio"
50 rset ph$ = "800-555-1212"
60 put 1
70 close 1
field, get, lset, open, rset
Any attempt to read or write past the end of the buffer causes a "Field
If FileNum is less than 1 or greater than the maximum number of
open files, or if FileNum is not open, a "Bad file number"
If FileNum is not open for random access, a "Bad file mode"
The Basmark QuickBASIC Programmerís Manual