Eof (Function)
Checks for the end of file.
Parameters
<File No.>
|
The file number (integer) of the file opened by the Open command.
|
Return Value
Returns the value of the integer.
The content of the value is as listed below.
0: The end of the file has not been reached
-1: The end of the file has been reached
Description
Check to see if the end of file has been reached for the file specified by <File No.>.
Example
Read in data until the end of the file.
Dim DATA$(255)
Open "C:\input.dat" FOR INPUT As #1
For I&=0 To 255
DATA$ = Input$(6,#1)
DATA$(I&)=DATA$
If Eof(1)<>0 Then Exit For
Next
Close #1
Erase DATA$()