Eof Function
Returns end of file status.
Syntax
Eof (fileNumber)
Parameters
- fileNumber
- Specify an integer value from 30 to 63 or an expression.
Return Values
True if file pointer is at end of file, otherwise False.
Description
Eof is functional only if the file is opened for reading mode.
An error occurs if the file was opened with the AOpen or WOpen statements.
See Also
Lof
Eof Function Example
Integer fileNum
String data$
fileNum = FreeFile
UOpen "TEST.DAT" As #fileNum
Do While Not Eof(fileNum)
Line Input #fileNum, data$
Print "data = ", data$
Loop
Close #fileNum