[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Return high byte/word/nibble of value.
Source position: systemh.inc line 769
function hi( |
b: Byte |
):Byte; |
i: Integer |
):Byte; |
w: Word |
):Byte; |
l: LongInt |
):Word; |
l: DWord |
):Word; |
i: Int64 |
):DWord; |
q: QWord |
):DWord; |
Hi returns the high nibble, byte or word from X, depending on the size of X. If the size of X is 4, then the high word is returned. If the size is 2 then the high byte is returned. If the size is 1, the high nibble is returned.
None
|
Return low nibble/byte/word of value. |
Program Example31; { Program to demonstrate the Hi function. } var L : Longint; W : Word; B : Byte; begin L:=1 Shl 16; { = $10000 } W:=1 Shl 8; { = $100 } B:=1 Shl 4; { = $10 } Writeln (Hi(L)); { Prints 1 } Writeln (Hi(W)); { Prints 1 } Writeln (Hi(B)); { Prints 1 } end.