Lo

Return low nibble/byte/word of value.

Declaration

Source position: systemh.inc line 900

  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 high nibble, byte or word or longword from X, depending on the size of X.

| Size | Return value | | 8 | Byte, low nibble | | 16 | Byte, low byte | | 32 | Word, low word | | 64 | Cardinal, low DWord |

Errors

None.

See also

Name Description
Chr Convert byte value to character value
Hi Return high byte/word/nibble of value.
Ord Return ordinal value of an ordinal type.

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.