Shiny Language Reference
Language Reference > File Functions
fclose
bool fclose(file FileVar);
Closes an open file
When a file opened with FOPEN is no longer required, FCLOSE closes the file and releases resources associated with it. FCLOSE is called automatically when the associated FILE variable is destroyed, but it is good practice to manually call FCLOSE at the appropriate time.
Parameters
FileVar
A variable declared as type FILE for the file to close.
Return Value
TRUE if closing the file suceeded, otherwise FALSE. The return value of FCLOSE can be used for further operations.
Example Code
bool Result = fclose(myfile);