To return -1 (true) when the end of a sequential or a communications file has been reached, or to return 0 if end of file (EOF) has not been found.
If a GET is done past the end of the file, EOF returns -1. This may be used to find the size of a file using a binary search or other algorithm. With communications files, a -1 indicates that the buffer is empty.
Use EOF to test for end of file while inputting to avoid "Input Past End" errors.
10 OPEN "I", 1, "DATA"
30 IF EOF(1) THEN 100
40 INPUT#1, M(C)
50 C=C+1: GOTO 30
The file named DATA is read into the M array until the end of the file is reached, then the program branches to line 100.
All Frank Sinatra recordings, All Beatles albums, All solo albums from John Lennon, Paul McCartney, George Harrison and Ringo Starr, All Beatles songs, List of Platinum selling albums, Database with hits from 1950 to 1999.
Sought after DLL files, Nutworks magazine (retro), Worldwide ISO and TLD codes, File extensions database, The Hackers dictionary, Free software for the Atari, Amiga and Macintosh, Nokia smartphone, PocketPC, List of all BASIC programming language commands, List of all DOS commands, Free Advanced Bash-Scripting Guide (Linux-Unix)