The CLOSE command is used to close a file or an output channel that has
been previously opened by the OPEN command. The "object" to be closed can
either be a filename or the name of one of the internally defined I/O
channels such as:
OUTPUT JOURNAL PRINTER
DEBUG ERROR TERMINAL
If a filename is specified, then CLOSE closes the file and reassigns
all output channels assigned to that file to their default devices.
If a channel is specified, then CLOSE finds the filename associated with
that channel and reassigns the channel to its default output device. If
that file is not being used for any other purpose then the file is closed.
However, if the file is being used for another channel then CLOSE does not
actually close the file, it simply stops using it for the named channel.
For example:
open journal 'jfile' ; keep journal of all cmds in JFILE
open debug 'jfile' ; send debugging messages to JFILE
open error 'jfile' ; send error messages to JFILE
open output 'jfile' ; send standard output to JFILE
...
close output ; send standard output to terminal
close 'jfile' ; close JFILE, turn off JOURNAL,
; send debugging and error messages
; to terminal
See also: OPEN[2], FILES[1].