open "data" for input as #2 20 if eof(2) then 100 v$ = input$(1, 2) print v$; goto 20 100 close #2
An "Illegal function call" error occurs if FileNum is open for random access.
An "Input past end" error occurs when an attempt is made to read beyond the end of the file.
from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber