contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
Referents: reopening in a different scope
Prerequisite Concepts     Related Syntax  

A stream opened and attached to a referent can, in OmniMark, be dynamically reopened by using the reopen action without an attachment ( the as part). Such a reopen simply prepares the already created referent to receive more text and (if the referent was opened with referents-allowed) referents.

If the referent attached to a closed stream belongs to an outer "referent scope" from the current one, then, even though it is reopened in the inner scope, it keeps its original identity and referent scope.

For example, in the following code both s1 and s2 are attached to referents called "A", but they are two different referents, distinguished by being in different referent scopes.

  open s1 as referent "a"
  close s1
  using nested-referents
  do
     open s2 as referent "a"
     reopen s1
     ...

If the referent attached to a closed stream belongs to an inner "referent scope" from the current one, then any attempt to open it is in error, because it becomes "unattached" when the inner referent scope is exited, and cannot have any more operations performed on it.

Prerequisite Concepts
     Referents
 
  Related Syntax
   reopen
 
----

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:00:51 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.