March 2000
Intermediate to advanced
576 pages
18h 13m
English
Flush Procedure
procedure Flush(var F: TextFile);
The Flush procedure forces the output of buffered
text to a text file that was opened for writing (with
Append or Rewrite). By default,
a text file accumulates a line of text before writing the text to the
file. Flush is not a real
procedure.
Flush flushes Delphi’s buffer, not the
operating system’s buffer. To make sure all data is safely
stored, close the file.
If the file is not open, Flush reports I/O error
103.
If Flush cannot write the text, perhaps because
the disk is full, it reports the Windows error code as an I/O error.
You can call Flush on an input file (opened with
Reset), but the function does nothing.
| IOResult Function, Rewrite Procedure, TextFile Type, Write Procedure, WriteLn Procedure |
Read now
Unlock full access