[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'System' (#rtl)

EOLn

Check for end of line

Declaration

Source position: line 0

function EOLn(

  var t: Text

):Boolean;

function EOLn: Boolean;

Description

Eofreturns Trueif the file pointer has reached the end of a line, which is demarcated by a line-feed character (ASCII value 10), or if the end of the file is reached. In all other cases Eofreturns False. If no file Fis specified, standard input is assumed. It can only be used on files of type Text.

Errors

None.

See also

Eof

  

Check for end of file

Assign

  

Assign a name to a file

Reset

  

Open file for reading

Rewrite

  

Open file for writing

Example

Program Example19;

{ Program to demonstrate the Eoln function. }

begin
  { This program waits for keyboard input. }
  { It will print True when an empty line is put in,
    and false when you type a non-empty line.
    It will only stop when you press enter.}
  While not Eoln do
    Writeln (eoln);
end.