help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions][Variables] Reference for unit 'objpas' (#rtl)

CloseFile

Close text or untyped file

Declaration

Source position: line 0

procedure CloseFile(

  var f: file

);

procedure CloseFile(

  var t: Text

);

Description

CloseFile flushes and closes a file F of any file type. F can be Text or a typed or untyped File variable. After a call to CloseFile, any attempt to write to the file F will result in an error.

It is most likely introduced to avoid confusion between the regular Close function and the Close method of TForm in the Delphi VCL.

for an example, see AssignFile.

Errors

None.

See also

#rtl.system.Close

  

Close a file

AssignFile

  

Assign text or untyped file

#rtl.system.Reset

  

Open file for reading

#rtl.system.Rewrite

  

Open file for writing

#rtl.system.Append

  

Open a file in append mode

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505