Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>numxor()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
NUMXOR()

Syntax:     NUMXOR(<expH1>,<expH2>)

Arguments:  <expH1> and <expH2> are either decimal numbers or a
            hexadecimal string of digits.

Returns:    A numeric value.
            Will return the exclusive OR of the two arguments.

Usage:      Only the bits that were different in the two interconnected bit
            fields will be set to one in the resultant number.  With
            NUMXOR() it is possible to encode small numbers very
            easily.  It is also commonly used in check sum calculations.

Notes:      An invalid argument will lead to the result of -1.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * A connection of two numbers with NUMXOR()
            ? NUMXOR(3,5)               && Result: 6

            * Value 1 in binary:        00000011
            * Value 2 in binary:        00000101
            *
            * Result 6 in binary        00000110

            * Coding and decoding numbers
            ? NUMXOR(NUMXOR(num,9),9)   && will return num



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

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