Warning: include(../mainbanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/closefile.php on line 34

Warning: include(../mainbanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/closefile.php on line 34

Warning: include() [function.include]: Failed opening '../mainbanner.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/delphibasics/closefile.php on line 34

Warning: include(../left.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/closefile.php on line 55

Warning: include(../left.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/closefile.php on line 55

Warning: include() [function.include]: Failed opening '../left.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/delphibasics/closefile.php on line 55
Delphi Basics

CloseFile procedure

Closes a opened file where a opened file is handled by a variable file F. You must use CloseFile() as the last procedure before you leave and freeing a opened file.

Unit
System

Syntax:
procedure CloseFile(var F);

Where F is a file variable that has been opened.
Note: {$I+} handles runtime errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.

example:
See read() example and write() example program

back to top


Warning: include(../right.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/closefile.php on line 113

Warning: include(../right.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/closefile.php on line 113

Warning: include() [function.include]: Failed opening '../right.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/delphibasics/closefile.php on line 113


Warning: include(../ulink180x90.php) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/closefile.php on line 116

Warning: include(../ulink180x90.php) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/closefile.php on line 116

Warning: include() [function.include]: Failed opening '../ulink180x90.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/delphibasics/closefile.php on line 116


Warning: include(../bottombanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/closefile.php on line 130

Warning: include(../bottombanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/delphibasics/closefile.php on line 130

Warning: include() [function.include]: Failed opening '../bottombanner.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/delphibasics/closefile.php on line 130