Sign in Join
Wiki copytemporary

Basic Pascal Tutorial/Chapter 2/EOLN and EOF

Sent here from EOLN and EOF.

Deutsch · English · Français · Български · 中文(中国) · 日本語

2E - EOLN and EOF (author: Tao Yue, state: unchanged)

EOLN is a Boolean function that is TRUE when you have reached the end of a line in an open input file.

pascal
eoln (file_variable)

If you want to test to see if the standard input (the keyboard) is at an end-of-line, simply issue eoln without any parameters. This is similar to the way in which read and write use the console (keyboard and screen) if called without a file parameter.

pascal
eoln

EOF is a Boolean function that is TRUE when you have reached the end of the file.

pascal
eof (file_variable)

Usually, you don't type the end-of-file character from the keyboard. On DOS/Windows machines, the character is Control-Z. On UNIX/Linux machines, the character is Control-D.


From the Free Pascal wiki, page "Basic Pascal Tutorial/Chapter 2/EOLN and EOF", as it stood on 2022-08-20 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Edited on wiki.freepascal.org by 7 people, 2007–2022

From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.

WhenWhoWhat changed
KeesNew page: 2E - EOLN and EOF <tt>EOLN</tt> is a Boolean function that is <tt>TRUE</tt> when you have reached the end of a line in an open input file. eoln (file_variable) If you want to test to se...
Kees
Kees
Kees
Kees
Kees
VincentText replace - "delphi>" to "syntaxhighlight>" (minor)
Jwdietrich
Swen (minor)
FTurtle
FTurtle
TrevFixed syntax highlighting (minor)
Kai BurghardtKai Burghardt moved page EOLN and EOF to Basic Pascal Tutorial/Chapter 2/EOLN and EOF: tidy up main name space: create subpage hierarchy for basic Pascal tutorial [cf. [[Special: PermaLink/149778#Clutter... (minor)
Kai Burghardtbypass redirects [cf. discussion]
Kai Burghardtbypass language bar/categorization template redirect [cf. discussion] (minor)

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.