swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax    
modifier  

referents-displayed

 
 

Syntax

with referents-displayed (& open-modifier)


Purpose

This modifier allows referents to be written to the stream. The referents are immediately converted to a string expression identifying the name of the referent and its current value. This string expression is an ordinary value. No replacement is done when referents are resolved.

The purpose of this modifier is to allow referents to be written to streams without buffering those streams until referents are resolved, and to display something useful when doing so. This is primarily useful in programmer-generated errors, warnings, or information messages, where the contents of a buffer containing referents needs to be displayed.

For example, the following block of code write the same referent to two files, one with referents-allowed modifier and the other with referents-displayed.

  process
     using output as (file "foo.txt" with referents-allowed) &  (file "bar.txt" with referents-displayed)
        output referent "greeting"
  
     set referent "greeting" to "Hello, World!"

After the run, the contents of the file foo.txt will be

  Hello, World!
and file bar.txt will contain
   <?REF "greeting">

    Related Syntax
   referents-allowed
 
 
 

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

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:33:48 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.