Difference between revisions of "Basic Pascal Tutorial/Chapter 2/EOLN and EOF"

From Free Pascal wiki
Jump to navigationJump to search
(bypass redirects [cf. discussion])
m (bypass language bar/categorization template redirect [cf. discussion])
 
Line 1: Line 1:
{{EOLN and EOF}}
+
{{Basic Pascal Tutorial/Chapter 2/EOLN and EOF}}
 
{{TYNavigator|Chapter 2/Files|Chapter 2/Programming Assignment}}
 
{{TYNavigator|Chapter 2/Files|Chapter 2/Programming Assignment}}
  

Latest revision as of 16:18, 20 August 2022

български (bg) Deutsch (de) English (en) français (fr) 日本語 (ja) 中文(中国大陆)‎ (zh_CN)

 ◄   ▲   ► 

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.

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.

eoln

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

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.

 ◄   ▲   ►