bas7advr.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
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
For a non-ISAM file, EOF tests for the end-of-file condition. For an ISAM
table, EOF tests whether the current position is at the end of a table.
EOF(filenumber%)
■ The argument filenumber% is the number used in the OPEN statement
to open the table.
Usage Notes
■ 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.
■ Use the EOF function with sequential files to test for the end of a
file. This helps you avoid an "Input past end" error.
■ 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. 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.
Important
■ EOF cannot be used with the BASIC devices SCRN, KYBD, CONS, LPTn,
or PIPE.