12.5.6         close

Description:   closes an open file, channel, port or socket.

Syntax:         close  channelid


Argument:     channel ID (handle)

Returns:        empty string, errors 

See Also:       open


Examples:      set fileid [open "../Report1.txt" a+]

                                puts $fileid "[GETVAL %TTMTIME]  [GETVAL AMPLITUDE]"

                                close $fileid

Closes the channel given by channelId.   The Channel Id must be a channel identifier (also called a 'handle") such as the return value from a previous open command. Channels are automatically closed when the calling program exists (i.e. the Client for Screen Scripts and the SCADA node Kernel for Global Scripts).

The command returns an empty string usually, and may generate an error if an error occurs while flushing output.