User Tools

Site Tools


jvs:cigal:manual:chapter2:close

CIGAL Reference Manual, Chapter 2 (Commands): CLOSE

CLOSE -- Close an open file or data channel

usage: close object

The CLOSE command is used to close a file or an output channel that has been previously opened by the OPEN(2) 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:
FILES(1), OPEN(2)

CIGAL Home, CIGAL Manual, Commands List, Manual Help

jvs/cigal/manual/chapter2/close.txt · Last modified: 2023/02/23 18:43 (external edit)