swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax    
operator  

is open

 

 

Return type: Boolean
Returns:       

Returns true if the stream has been opened or reopened and not yet closed, and false otherwise. Replacing is with isnt will reverse the results.



Syntax
  stream-name indexer? (is | isnt) open


Purpose

You can use is open to determine if a stream variable is open. A stream is open if it has been opened or reopened, but is not yet closed.

The following code opens a stream if it is not already open:

  open my-stream as buffer unless my-stream is open

The following code shows two OmniMark stream state tests that use isnt open:

  document-start
     local stream s
     ...
     open s as buffer when s isnt open
     ...
     close s when s isnt closed
     ...

    Related Syntax
   open
   reopen
 
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:22 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.