Aller au contenu principal

ReadLn

Reads a line of text from a file.

Structure

Readln([ var F: Text; ] V1 [, V2, ...,Vn ]);

Parameters

Description

The Readln procedure reads a line of text and then skips to the next line of the file.

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.

When an application is compiled as a console application (using the Generate console application checkbox on the Linker page of the Project|Options dialog, or a -cc command line switch with the command-line compiler), Delphi automatically associates the Input and Output files with the application's console window. For non-console applications, any attempt to read from Input or write to Output will generate an I/O error. |