swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
    Related Concepts  
operator   complement    

Return type: Integer
Returns:       

A bit sequence.



Syntax
  complement numeric-expression


Purpose

The complement of two bit sequences is a new sequence where each bit is "flipped". In other words, each bit is:

For example, the complement of 0 is "111111111111111111111111111111111111" base 2. (This actually results in a negative number on most systems because the topmost bit is a sign bit. A "1" in this position usually indicates a negative number. This is one reason to avoid dealing with numeric expressions as both bit sequences and numbers at the same time.)

Other languages sometimes refer to this operator as a "bit-wise not" because the operation is analogous to the logical "not" operation. To avoid confusion, OmniMark reserves the operator "!" (not) for the logical "not" operation.

Usage example:

  set c to complement 1

  set c to c mask complement 1

      Related Concepts
   Bit-oriented arithmetic
 
----  

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

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

Copyright © OmniMark Technologies Corporation, 1988-2000.