swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Related Concepts  
operator  

mask

 

 

Return type: Integer
Returns:       

A bit sequence.



Syntax
  numeric-expresion mask numeric-expression


Purpose

mask is a bit-oriented operator used to help isolate, process and create binary values. The result of masking two bit sequences is a new sequence where each bit in the new sequence is one (1) if both corresponding bits in the masked sequence are one (1), and zero (0) if either of the corresponding bits is zero (0).

Other languages sometimes refer to this operation as a "bit-wise and" because the operation is analogous to the logical "and" operation. To avoid confusion, OmniMark reserves the keyword and and the operator "&" for the logical "and" operation.

The example shows a do block which will be executed if the lowest order bit in "c" has the value 1.

  do when c mask 1 != 0
  ...
  done

      Related Concepts
   Bit-oriented arithmetic
 
 

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

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:30 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.