Cicode Programming Reference > Cicode Function Categories > File Functions Introduction > FileClose

FileClose

Closes a file. All data written to the file is flushed to disk when the file is closed, and the file number becomes invalid.

Syntax

FileClose(File)

File:

The file number.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

FileOpen

Example

File=FileOpen("C:\Data\Report.Txt","r");
..
! Do file operations.
..
! Close the file.
FileClose(File);

See Also

File Functions