| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Retrieves the high byte of a 16-bit integer.
NumHigh( <nInteger>|<cHex> ) --> nHighByte
The function returns the high byte of a 16-bit integer as a numeric value.
| See also: | NumLow() |
| Category: | CT:NumBits , Numbers and Bits |
| Source: | ct\numlohi.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example displays the high byte of a 16-bit integer.
PROCEDURE Main
LOCAL nValue := HexToNum( "ABCD" )
LOCAL nByte
? nValue // result: 43981
? nByte := NumHigh( nValue ) // result: 171
? NumToHex( nByte ) // result: AB
? nByte := NumLow( nValue )
? NumToHex( nByte )
RETURN
http://www.xHarbour.com