swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    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 ] [ LEGACYLIBRARIES ] [ ERRORS ]

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

Copyright © Stilo Corporation, 1988-2005.