close

action

Syntax
close stream-name indexer?


Purpose

The close action explicitly closes a stream shelf item. Once a stream that is attached to a file, buffer, referent, markup parser, or external string sink function has been closed, the same stream name can be used to open another attachment.

Streams do not normally need to be closed because:

  • they are closed automatically when the scope of the stream shelf item ends, and
  • they are closed automatically if another open is performed on the stream shelf item.

Several streams can be closed at once.

It is an error to close a stream that is part of any #current-output for any currently open rule or function.

Related Syntax