Programming instructions

Intermec Fingerprint v7.61 Programmers Reference Manual Ed. 776
Chapter 2 Program Instructions
EOF
Field of Application
Function for checking for an end-of- le condition.
Syntax EOF(<nexp>)
<nexp> is the number assigned to the le when it was OPENed.
Remarks
The EOF function can be used with les OPENed for sequential input in
connection with the statements INPUT#, LINE INPUT#, and INPUT$ to
avoid the error condition Input past end which has no error message.
When the EOF function encounters the end of a le, it returns the value -1
(true). If not, it returns the value 0 (false).
Example
10 DIM A%(10)
20 OPEN "DATA" FOR OUTPUT AS #1
30 FOR I%=1 TO 10
40 PRINT #1, I%*1123
50 NEXT I%
60 CLOSE #1
70 OPEN "DATA" FOR INPUT AS #2
80 I%=0
90 WHILE NOT EOF(2)
100 INPUT #2, A%(I%):PRINT A%(I%)
110 I%=I%+1:WEND
120 IF EOF(2) THEN PRINT "End of File"
RUN
yields:
1123
2246
3369
4492
5615
6738
7861
8984
10107
11230
End of File