contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
Referents: specifying default definitions
Prerequisite Concepts     Related Syntax  

A defaulting part can be specified with referents-allowed in an open action. It has two possible forms. It can be specified with either one string expression or two, and provides an effective value for referents as follows:

If there is one string expression, then that is the effective value. For example, if a referent does not provide an effective value and the stream's associated referent set is declared as follows, then the referent's effective value is "no value".

  open s with referents-allowed defaulting {"*no value*"}
            as file "s.txt"

To ensure that undefined referents are simply omitted from any stream to which they are written, use the zero-length string as their default effective value, as in:

  open s with referents-allowed defaulting {" "}
            as file "s.txt"

If there are two string expressions, then the effective value is the name of the referent, with the first string preceding it and the second following it. For example, if a referent whose name is "my-ref" has no contents, but the stream to which it is written is opened as follows, then the referent's effective value is "(undefined referent="my-ref")":

  open s with referents-allowed
            defaulting {"(undefined referent=%"", "%")"}
            as file "s.txt"

To get just the name with no surrounding text (preceding or following the referent name, or both), use two zero-length strings, as in:

  open s1 with referents-allowed defaulting {"", ""}
            as file "s1.txt"

The defaulting part, if any, used to provide the effective value of an undefined referent is the defaulting part associated with the "final destination" of the referent. This has a number of consequences:

Prerequisite Concepts
     Referents
 
  Related Syntax
   defaulting
 
----

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.