System.Readln

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Readln(); overload;
procedure Readln(var V1: Char); overload;
procedure Readln(var V1: Integer); overload;
procedure Readln(var V1: Cardinal); overload;
procedure Readln(var V1: Int64); overload;
procedure Readln(var V1: UInt64); overload;
procedure Readln(var V1: Extended); overload;
procedure Readln(var V1: String); overload;
procedure Readln(var F: File); overload;
procedure Readln(var F: File; var V1: Char); overload;
procedure Readln(var F: File; var V1: Integer); overload;
procedure Readln(var F: File; var V1: Cardinal); overload;
procedure Readln(var F: File; var V1: Int64); overload;
procedure Readln(var F: File; var V1: UInt64); overload;
procedure Readln(var F: File; var V1: Extended); overload;
procedure Readln(var F: File; var V1: String); overload;

Properties

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

Description

Reads a line of text from a file.

In Delphi 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