Name
Input Variable
Syntax
var Input: TextFile;
Description
The Input
variable is a text file that Delphi
automatically opens for reading, but only in console applications.
The input file is usually the console, but the user can redirect
input from the command shell.
Input
is an ordinary TextFile
,
and you can close it or open a different file. If you open a file
without a name, that is the same as opening the console file. For
example, Delphi always performs the following when a console
application starts
running:
AssignFile(Input, ''); Reset(Input);
Calling Read
or ReadLn
without
a file reference as the first argument is the same as calling
Read
or ReadLn
using
Input
as the first argument.
See Also
AssignFile Procedure, Output Variable, Read Procedure, ReadLn Procedure, Reset Procedure, TextFile Type |
Get Delphi in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.