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
◄Summary► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
EOF(filenumber%)
Usage Notes
■ Use the EOF function with sequential files to test for the end of a
file. Otherwise, Visual Basic generates the error message, "Input past
end."
■ When used with random-access or binary files, EOF returns true if the
last executed GET statement was unable to read an entire record.
■ When you use EOF with a communications device, the definition of the
end-of-file condition depends on the mode (ASCII or binary) in which
you opened the device:
Mode Description
══════ ═══════════════════════════════════════════════════════════
ASCII EOF is false until you receive Ctrl+Z, after which it
remains true until you close the device
Binary EOF is true when the input queue is empty (LOC(n)=0);
it becomes false when the input queue is not empty
■ The EOF function returns true (nonzero) if the end of a non-ISAM file
has been reached or if the current position in an ISAM table is at the
end of the table. The end of an ISAM table is the position immediately
following the last record according to the current index.
■ EOF cannot be used with the Visual Basic devices SCRN, KYBD, CONS, LPTn,
or PIPE.