reopen stream-name indexer? open-modifier?
reopen action is used to open an existing stream object that was previously closed using the
close action. (The exception to this is built-in streams like
#main-output, which are dynamically reopenable.) Unlike with the
open action, the contents of the attached object are not erased when it is reopened.
process local stream foo local stream bar open foo as buffer put foo "Now is the winter " close foo open bar as buffer put bar "Now is the winter " close bar open foo as buffer put foo "of our discontent" close foo reopen bar put bar "of our discontent" close bar output foo || "%n" output bar || "%n"
reopen new form is used, a new item is added to the specified
stream shelf. The restrictions on this form of the
reopen action are
the same as those of the
set new action. In this case, the attachment
must be specified.
When reopening a stream:
reopen s with "".
binarymodifiers are treated in two ways. If the modifier is specified, then it is applied to the stream; if the modifier is not specified, the default value is used. The previous settings are not retained.
Previous versions of OmniMark allowed an attachment to be specified
when reopening a stream:
This had the effect of opening the attachment in append mode. This
form of the
reopen action is deprecated and should no longer be
used. In its place, the
append modifier should be used with the