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. The get statement on line 30 reads a record into the file buffer. Line 40 displays the information from the record that was read.
A "Bad file mode" error occurs if FileNum is not open for random access.
from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber