| [Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | 
Set file position to end of file
Source position: systemh.inc line 1256
| function SeekEOF( | 
| var t: Text | 
| ):Boolean; | 
SeekEof returns True is the file-pointer is at the end of the file. It ignores all whitespace. Calling this function has the effect that the file-position is advanced until the first non-whitespace character or the end-of-file marker is reached.
If the end-of-file marker is reached, True is returned. Otherwise, False is returned.
If the parameter F is omitted, standard Input is assumed.
| Remark: | The SeekEOF function can only be used on real textfiles: when assigning the file to other kinds of (virtual) text files, the function may fail, although it will perform a number of tests to guard against wrong usage. | 
A run-time error is generated if the file F isn't opened.
| 
 | Check for end of file | |
| 
 | Set file position to end of line | |
| 
 | Set file position | 
Program Example57; { Program to demonstrate the SeekEof function. } Var C : Char; begin { this will print all characters from standard input except Whitespace characters. } While Not SeekEof do begin Read (C); Write (C); end; end.