System.Readln

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

procedure Readln(var F: File; [ ..., VN]); overload;
procedure Readln(var F: File; [ ..., VN]); overload;

Properties

Type Visibility Source Unit Parent
procedure public System.pas System System

Description

Reads a line of text from a file.

In Object Pascal code, the ReadLn procedure reads a line of text and then skips to the next line of the file.

The syntax shown here for ReadLn demonstrates that the procedure can take a variable number of arguments.

ReadLn(F) with no parameters causes the current file position to advance to the beginning of the next line, if there is one; otherwise, it goes to the end of the file.

If F is omitted, the global variable Input is used, which accesses the processes standard input file. The use of Input in GUI applications raises special issues.

Note: {$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.

See Also

Code Examples