Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Eoln Function
◄Summary► ◄Details► ◄Example► ◄Back►
Argument
file_variable Optional; open text file (default is standard
file Input)
Returns
Boolean True if current position is at end-of-line
marker or if Eof returns True, otherwise False
Description
The Eoln function returns a Boolean value indicating whether the
current file position is at an end-of-line marker in an open text
file. It checks the current position in the file. If Eoln finds
an end-of-line, an end-of-file, the actual end of the file, or an
empty file, it returns True. If Eoln finds any other character, it
returns False. Eoln does not change the current file position.
The end-of-file marker is the character CTRL+Z (ASCII 26). The end
of-line marker is the carriage-return character (ASCII 13).
Eoln differs from the SeekEoln function by not ignoring blanks and
tabs in determining whether the end of a file has been reached.
Thus, SeekEoln may be more useful than Eoln for reading text files
of numeric data.
If file_variable is not associated with a file or if the file is
not open when Eoln is called, an I/O error occurs.
To prevent a program from halting with a run-time error when an I/O
error occurs, turn off I/O checking with {$I-} and check the return
value of the IOResult function.