contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
Functions: side effects
Prerequisite Concepts     Related Syntax  

OmniMark places very few restrictions on what side effects a function can produce. The few restrictions OmniMark places on function side effects are, nonetheless, important.

A function is only able to write to and close streams that are domain-free or that are either opened in the same domain as that in which the function is called.

There is a certain non-determinism inherent in the mechanism OmniMark uses to select rules to be performed. This non-determinism provides the OmniMark implementation with opportunities to efficiently interpret OmniMark programs without placing undue restrictions on the language. Due to this non-determinism, functions called from the rule headers of unselected rules may or may not be called. OmniMark programmers should not count on any side effects either being performed, or not being performed in such function calls.

In general, functions which have side effects should not be called from rule headers.

Well-written programs will always have very few side effects, and most programs shouldn't encounter the problems introduced by functions changing values "behind the scenes".

Prerequisite Concepts
     Functions
 
  Related Syntax
   define function
   domain-free
 
----

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

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

Copyright © OmniMark Technologies Corporation, 1988-1999.