Closing a sequential file, socket or pipe

close #

Close a sequential file, socket or pipe


SYNTAX

close #channel [, #channel] …

Closes the sequential file, socket or pipe that is currently open on a specified channel or channels.

channel

An integer in the range 1-64 specifying the number of the channel on which the sequential file, socket or pipe (opened by the open # command) is open. It may be a constant, field name or expression.

Channel 0 (zero) is the standard I/O channel and may not be closed.


NOTES

  • If the channel is already closed the command is ignored.

  • The number of files that may be open at the same time is operating system dependent.

  • A list of channels, separated by commas, may follow the close # command. However, these may not be mixed with object or file identifiers, which may only be closed by means of the close command.


EXAMPLE

close #1
close #tmp.Channel3

RELATED TOPICS

open #

close

Sequential files