EOF function (LotusScript® Language)

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

Syntax

EOF ( fileNumber )

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:

Binary

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

It successfully reads the amount of data requested.

Random

The last executed Get statement cannot read an entire record.

It successfully reads an entire record.

Sequential

The end of the file has been reached.

The end of the file has not been reached.

Usage

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.

Example