swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts  
operator  

&

 
 

Return type: Switch
Returns:       True or false when applied to switch expressions, a sink when applied to sink expresions.

Syntax

switch expression (and | &) switch expression

or

sink expression & sink expression


Purpose

The & operator is overloaded: it can be used either as a Boolean and operator, or as a tee operator on sinks.

When applied to arguments of switch type, the & operator is synonymous with the operator and: it returns true if all of its arguments evaluate to true, otherwise the result is false.

When applied to markup sink and string sink expressions, the & operator returns a string sink. If all arguments are of markup sink type, the result type will be a markup sink as well. The sink returned by the operator acts as a "tee" connector: any data output into it will be replicated and distributed to all component sinks that were given as arguments of &.

Usage example:

  using output as #error & file "error.log"
     output "An error occurred."

    Related Syntax
 
Related Concepts
 
 

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

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:51:21 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.