Sign in Join
FPDoc Onlineexperiment

ReadLn procedure

In unit System

Read from a text file into variable and goto next line.

Declaration

pascal
procedure ReadLn(var F: Text; Args: Arguments)

Description

Read reads one or more values from a file F, and stores the result in V1, V2, etc. After that it goes to the next line in the file. The end of the line is marked by any of the supported line ending styles, independent of the platform on which the code is running (supported line ending styles are CRLF, LF or CR). The end-of-line marker is not considered part of the line and is ignored.

If no file F is specified, then standard input is read. The variables V1, V2 etc. must be of type Char, Integer, Real, String or PChar.

For an example, see Read.

Errors

If no data is available, empty values are returned (0 for ordinal values, empty strings for string values)

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.