EOF function (LotusScript® Language)

Returns an integer value that indicates whether the end of a file has been reached.


EOF ( fileNumber )


The ID number assigned to the file when it was opened.

Return value

The return value depends on the type of file that you are using. The following table shows the EOF return values for binary, random, and sequential file types.

File type

EOF returns TRUE if:

EOF returns FALSE if:


The last executed Get statement cannot read the amount of data (the number of bytes) requested.

It successfully reads the amount of data requested.


The last executed Get statement cannot read an entire record.

It successfully reads an entire record.


The end of the file has been reached.

The end of the file has not been reached.


The end of file is determined by the operating system (from the file length stored in the file system). A Ctrl+Z character (ASCII 26) is not considered an end-of-file marker for any type of file: sequential, random, or binary.