qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
EOF Function Details
  QuickSCREEN      Details      Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
EOF Function Details
 
Syntax
  EOF(filenumber)
 
The EOF function returns -1 (true) if the end of a sequential
file has been reached. Use the EOF function to test for end-of-file
while inputting data. In this way you may avoid the "Input past end"
error message.
 
When EOF is used with random-access or binary files, it returns "true"
if the last executed GET statement was unable to read an entire
record. This happens because of an attempt to read beyond the end of
the file.
 
EOF cannot be used with the BASIC devices SCRN:, KYBD:, CONS:,
and LPTn:.
 
When you use EOF with a communications device, the definition of the
end-of-file condition is dependent on the mode (ASCII or binary) in
which you opened the device. In ASCII mode, EOF is false until you
receive CTRL+Z, after which it remains true until you close the
device. In binary mode, EOF is true when the input queue is empty
(LOC(n)=0). It becomes "false" when the input queue is not empty.