|        | |||||
|  | |||||
| Referents: allowing referents in main output | |||||
| Prerequisite Concepts | Related Syntax | ||||
The #main-output stream usually has referents-allowed applied to it if referents are used in the OmniMark program. Especially with the introduction of local referent scopes, this may often be inappropriate. It may often be the case that the main output has no referents written to it and should not be buffered in a manner that allows referents to be written to it, even though there are other streams to which referents are being written.
OmniMark provides programmer control over how #main-output is opened with regards to referent use with the declare #main-output declaration. The programmer can specify one of the following:
declare #main-output has referents-allowed declare #main-output has referents-not-allowed declare #main-output has referents-displayed
If a program contains a declare #main-output declaration then it determines how #main-output is opened. A program can contain more than one declare #main-output declaration, but they must all agree on their choice.
If a program does not contain a declare #main-output declaration, then the program is examined for any use of:
If the program uses any of these keywords, #main-output is opened with referents-allowed. If the program does not use any of these keywords, #main-output is opened with referents-not-allowed.
| Prerequisite Concepts Input/Output Referents Referents: writing referents to a stream | Related Syntax #main-output referents-allowed referents-displayed referents-not-allowed set referent silent-referent using nested-referents | 
| ---- |