Syntax
endReached =
eof(
fileID)
Description
This function returns a BOOL YES (1) if the "file mark" associated with the specified open file is positioned at the end of the file. Otherwise it returns a BOOL NO (0). The "file mark" is an internal pointer which is used by all operations which read from or write to the file; it indicates where in the file the next data should be read from or written to. You can move the file mark explicitly using the record statement; the file mark is also advanced automatically every time you do a read or write operation. Typically, eof is used when reading data sequentially to determine when no more data can be read from the file.
Note/Reminder
- If your program attempts to read data past the end of the file, FutureBasic returns an _endOfFile error to your program.
- Since eof returns a standard boolean value, combining it with FB's NOT bitwise operator will result in failure to detect end of file.
See also
error function; error statement; on error fn; on error fn/gosub; open; close; record; rec; pos; lof