next up previous contents index
Next: Erase Up: Functions and Procedures Previous: Eof

Eoln

   

Declaration:

Function Eoln [(F : Text)] : Boolean;

Description:

Eof returns True if 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 Eof returns False.

If no file F is specified, standard input is assumed. It can only be used on files of type Text.

Errors:

None.

See also:

Eof, Assign, Reset, Rewrite

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.}
  Writeln (eoln);
end.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998