get - read a record from random access file
reads a record from a file opened for random access into the file buffer.
FileNum may be any numeric expression and is assumed to be the number
under which the file was opened.
RecNum is the record number of the record to be read.
If RecNum is omitted,
reads the next record following the previous
statement, the data in the random file buffer can be accessed
by referring to variables defined in a
statement for the same file number.
10 open "cust" as #1 len = 150
20 field 1, 30 as custname$, 30 as addr$, 35 as city$
30 get 1
40 print custname$, addr$, city$
opens the file "cust" for random access, with
fields defined in line 20.
statement on line 30 reads a record into the file buffer.
Line 40 displays the information from the record that was read.
field, lset, open, put, rset
A "Bad file number" error occurs if FileNum is less than one or greater
than the maximum allowed value.
A "Bad file mode" error occurs if FileNum is not open for random access.
The Basmark QuickBASIC Programmerís Manual