[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NUMMIRR()
 Mirrors 8-bit or 16-bit values
------------------------------------------------------------------------------
 Syntax

     NUMMIRR(<nNumber|cNumber>,[<l8/16bit>])
         --> nResult

 Arguments

     < nNumber/cNumber>  Designates a numeric value in the range of 0 to
     65535, or a hexadecimal string within which 8 or 16 bits are mirrored.

     <l8/16bit>  Designates whether 16 bits (.F.) or 8 bits (.T.) are
     mirrored.  The default value is .F..

 Returns

     NUMMIRR() returns a value by which the bit opposite the first parameter
     is mirrored.  If there is an invalid parameter, a value of -1 is
     returned.

 Description

     Use this function in the accompanying font editor to mirror characters
     with bit patterns.  Bits with values in 0 to 65535 range are mirrored.
     When you mirror bit 16, bit 1 interchanges with bit 16, bit 2 with bit
     15, etc..  You can also designate the first parameter as a hexadecimal
     string in "0ABE" form and the result is always numeric.

 Examples

     .  Initialize the number to mirror:

        nVar  :=  128 + 64 + 8 + 2                // 00000000 11001010

     .  Mirror bit 16:

        ? NTOC(NUMMIRR(nVar), 2, 16, "0")         // 01010011 00000000

     .  Only mirror bit 8:

        ? NTOC(NUMMIRR(nVar, .T.), 2, 16, "0")    // 00000000 01010011


See Also: NUMAND() NUMHIGH() NUMLOW() NUMNOT() NUMOR()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson