Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>numxor()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NUMXOR()
 Performs a 16-bit "XOR" of two numbers
------------------------------------------------------------------------------
 Syntax

     NUMXOR(<nWORD1|cHexWORD1>,<nWORD2|cHexWORD2>)
         --> nWORD-XOR

 Argument

     <nWORD1|cHexWORD1> and <nWORD2|cHexWORD2>  Designates as either
     decimal numbers or hexadecimal digit strings.

 Returns

     The returned value corresponds to all the values designated as
     parameters joined with a logical exclusive OR.

 Description

     Only those bits that are different in the 2-bit fields and that you want
     to link together, are set to 1 in the result value.  Use NUMXOR() to
     encode smaller numbers.

 Note

     .  An invalid parameter returns a result of -1.

 Examples

     .  Link two numbers with NUMXOR():

        Value 1 in binary:      00000011
        Value 2 in binary:      00000101
                                ________
        The result: (6)         00000110
        ? NUMXOR(3, 5)                  // Result:  6

     .  Encode and decode numbers:

        ? NUMXOR(NUMXOR(nNumber, 9), 9)


See Also: NUMAND() NUMNOT() NUMOR() SETBIT() ISBIT()

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