Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - or() perform a bitwise or on two parameters http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 or()                Perform a bitwise OR on two parameters
------------------------------------------------------------------------------
 Declaration
   bit.hdr

 Syntax
   func uint or extern
   param value uint uNumber1, ;
         value uint uNumber2

 Arguments
   eNumber1 is a numeric expression.
   eNumber2 is a numeric expression.

 Return
   The result of the OR operation.

 Description
   The or() function performs a bitwise OR operation on the given parameters.

 Example
   #define EXAMPLE_MATH
   #include example.hdr

   proc Test_or
   /* decimal representation   binary representation
   
          128                           10000000
            2                           00000010
                 OR                     --------
            2                   Result: 10000010
   */
   ? or( 128, 2 )                // prints 130
   ? or( 10000000B, 00000010B )  // prints 130
   endproc

   proc main
   Test_or()
   endproc

See Also: and() not() xor()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson