%fclose() function

The %fclose() function closes the stream specified by stream returned by a previous call to %fopen().

Syntax

var = %fclose((char*)stream)
Note: stream is defined as a pointer to a character, instead of a pointer to a file.
CAUTION:
Closing one of the system files (stdin, stdout, and so on) has unpredictable results.