RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.SeekEof Function

Returns the end-of-file status of a file, ignoring whitespace.

Pascal
function SeekEof: Boolean; overload;
function SeekEof(var F: Text): Boolean; overload;
C++
Boolean SeekEof();
Boolean SeekEof(Text F);

System

In Delphi code, call SeekEof to determine whether there is only whitespace between the file pointer and the end of a file. SeekEof moves the file pointer past any whitespace, leaving it positioned at the end of a file or on the next non-whitespace character, whichever comes first. If it leaves the file pointer at the end of the file, SeekEof returns true. Otherwise, it returns false. 

SeekEof can only be used on open text files.

Note: {$I+} handles runtime errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!