[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'System' (#rtl)

lo

Return low byte/word of value.

Declaration

Source position: line 0

function lo(

  B: Byte

):Byte;

function lo(

  i: Integer

):Byte;

function lo(

  w: Word

):Byte;

function lo(

  l: LongInt

):Word;

function lo(

  l: DWord

):Word;

function lo(

  i: Int64

):DWord;

function lo(

  q: QWord

):DWord;

Description

Lo returns the low byte of its argument if this is of type Integer or Word. It returns the low word of its argument if this is of type Longint or Cardinal.

Errors

None.

See also

Ord

  

Return ordinal value of an ordinal type.

Chr

  

Convert byte value to character value

Hi

  

Return high byte/word of value.

Example

Program Example38;

{ Program to demonstrate the Lo function. }

Var L : Longint;
    W : Word;

begin
  L:=(1 Shl 16) + (1 Shl 4);  { $10010 }
  Writeln (Lo(L));            { Prints 16 }
  W:=(1 Shl 8) + (1 Shl 4);   { $110   }
  Writeln (Lo(W));            { Prints 16 }
end.
The latest version of this document can be found at lazarus-ccr.sourceforge.net.