Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-08

Two Questions

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luis Del Aguila

Two questions

1.- What is the difference with seekeoln() and eoln() functions? 2.- What is the difference with seekeof() and eof() functions?

Unknown author
to Luis Del Aguila
Luis Del Aguila wrote
Two questions 1.- What is the difference with seekeoln() and eoln() functions?

The first advances the file position to the end of the line. The second returns true if the current position is the end of the line.

2.- What is the difference with seekeof() and eof() functions?

Same as 1, only for end of file instead of end of line.

This is described in the documentation.

Michael.

Olle Raab
Show quoted text 18 lines
On Sat, 23 Aug 2003, Luis Del Aguila wrote: > Two questions > > 1.- What is the difference with seekeoln() and eoln() functions? The first advances the file position to the end of the line. The second returns true if the current position is the end of the line. > 2.- What is the difference with seekeof() and eof() functions? Same as 1, only for end of file instead of end of line. This is described in the documentation. Michael.

The documentation (below) doesn't seem to corresponds entirelly to what you write above. That is it doesnt go unconditionally to the end of file...

Which is the most correct description of the function ?

Show quoted text 11 lines
Declaration: Function SeekEof [(Var F : text)] : Boolean; Description: 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.

Olle