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>numand()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
NUMAND()

Syntax:     NUMAND(<expH1>,<expH2>[,...<expH_n>])

Arguments:  <expH1> to <expH_n> may be either decimal numbers or
            hexadecimal string of digits.

Returns:    A numeric value.
            All arguments are connected with AND, and the result is
            returned.

Usage:      This function can be used to test several bits in one number
            simultaneously, in a very simple manner.  It us also possible
            to mask out specific by connecting the bits in an AND
            configuration, causing the remaining bits of no interest to be
            set to 0.  All the numbers denoted as arguments will then be
            connected with AND.

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

Library:    CT1.LIB


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

Examples:   * Testing an interface register

            status = COM_MSR()

            IF NUMAND(status,7) = 5

               ? "Bit 1 and bit2 are set."

            ENDIF

            * The register will contain: 00011101
            * The constant in binary: 00000101
            *
            * The result (5) 00000101



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

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