[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
EOLN Test For End of Line pp 102
Syntax: Eoln (TextFileVar) ;
Type: Boolean
Form: Function
Purpose: A Boolean function which returns True if the text file pointer is
at the end of file or the end of the current file line.
Notes: Eoln can be used with Read to determine the current position in the
file line of text. Read can become stuck at the end of the current
line, as it does not advance the file pointer to the next line.
ReadLn is used to advance the pointer to the next line.
----------------------------------------------------------------------------
Usage:
VAR
TextFileVar : Text ; { Define a text file }
TextVar : String [8] ; { Input variable }
BEGIN
Assign (TextFileVar,'C:Name.Ext') ; { Assign file name }
Reset (TextFileVar) ; { Open for processing }
While Not Eof (TextFileVar) Do { Do until end of file }
Begin
While Not Eoln (TextFileVar) Do { Read current line }
Begin
Read (TextFileVar, TextVar) ; { Read file line }
End ;
ReadLn ; { Advance to next line }
End ;
Close (TextFileVar) ; { Close the file }
END.
See Also:
Eof
Read
ReadLn
SeekEof
SeekEoln
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson