March 2000
Intermediate to advanced
576 pages
18h 13m
English
Output Variable
var Output: TextFile;
The Output variable is a text file that Delphi
automatically opens for writing, but only in console applications.
The output file is usually the console, but the user can redirect
output from the command
shell.
Output is an ordinary TextFile,
and you can close it or open a different file. Opening a file without
a name is the same as opening the console file. For example, Delphi
always performs the following when a console application starts
running:
AssignFile(Output, ''); Rewrite(Output);
Calling Write and WriteLn
without a file reference as the first argument is the same as calling
Write and WriteLn using
Output as the first argument.
| AssignFile Procedure, Input Variable, TextFile Type, Write Procedure, WriteLn Procedure |
Read now
Unlock full access