EOF¶
Syntax¶
Versions: Disk
Description¶
Returns -1 (true) if the end of a sequential file has been reached. Use EOF to test for end-of-file while INPUTting, to avoid "Input past end" errors.
Example¶
10 OPEN "I", 1, "DATA"
20 C = 0
30 IF EOF(1) THEN 100
40 INPUT #1, M(C)
50 C = C + 1 : GOTO 30
100 CLOSE #1