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

lo

Return low nibble/byte/word of value.

Declaration

Source position: systemh.inc line 766

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 size 2 (such as Word or SmallInt), or the low nibble if the size is 1 (such as byte). 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/nibble of value.

Example

Program Example38;

{ Program to demonstrate the Lo function. }

Var L : Longint;
    W : Word;
    B : Byte;
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 }
  B:=$EF;
  Writeln (Lo(B));            { Prints 15 }
end.

Documentation generated on: Nov 16 2015