DelphiBasics
Lo
Function
Returns the low-order byte of a (2 byte) Integer System unit
 function Lo(IntValue Integer):Byte;
Description
The Lo function returns the low order byte of a 2 byte integer IntValue as a single byte.
Related commands
HiReturns the hi-order byte of a (2 byte) Integer
ShlShift an integer value left by a number of bits
ShrShift an integer value right by a number of bits
 Download this web site as a Windows program.




 
Example code : Illustrate Ho and Lo functions
var
  i : Integer;

begin
  i := $2345;  // $2345 hex : $23 hi byte, $45 lo byte
  ShowMessage(Format('Integer = $%x', [i]));
  ShowMessage(Format('Hi byte = $%x', [Hi(i)]));
  ShowMessage(Format('Lo byte = $%x', [Lo(i)]));
end;
Show full unit code
  Integer = $2345
  Hi byte = $23
  Lo byte = $45
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page