| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Mirrors 8 or 16 bits of a 16-bit integer.
NumMirr( <nInteger>|<cHex>, ;
[<lEightBits>] ) --> nInteger
The function returns a numeric integer value with 16 or 8 bits set in reversed order.
| See also: | NumAND(), NumHigh(), NumLow(), NumMirrX(), NumNOT(), NumOR(), NumRoL() |
| Category: | CT:NumBits , Numbers and Bits |
| Source: | ct\bit1.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example displays results of NumMirr() and their binary
// representation.
PROCEDURE Main
LOCAL nValue := 4209
? nValue // result: 4209
? NtoC( nValue, 2, 16, "0" )
// result: 0001000001110001
? NumMirr( nValue ) // result: 36360
? NtoC( NumMirr( nValue ), 2, 16, "0" )
// result: 1000111000001000
? NumMirr( nValue, .T. ) // result: 4238
? NtoC( NumMirr( nValue, .T. ), 2, 16, "0" )
// result: 0001000010001110
RETURN
http://www.xHarbour.com