swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
    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 ] [ OMX ] [ OMX ] [ ERRORS ]

Generated: August 11, 2000 at 3:07:33 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.