Eof
Result = Eof ( [ Stream AS Stream ] ) AS Boolean
Returns
TRUE if we are at the end of the stream.
If
Stream is not specified, then the standard input is used.
See
LINE INPUT for an example.
The behaviour of
Eof()
depends on the stream blocking mode:
-
If the stream is in non-blocking mode, then
Eof()
returns if at least one byte can be read from the stream, just when Eof()
is called.
-
If the stream is in blocking mode, then
Eof()
will first wait for data to come before checking if something can be read.
Consequently, for non-file streams (pipes, processes, sockets...) in blocking mode, end of file will be reached when the other
end of the stream is closed.
See also