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

Odd

Is a value odd or even ?

Declaration

Source position: systemh.inc line 894

function Odd(

  l: LongInt

):Boolean;

function Odd(

  l: LongWord

):Boolean;

function Odd(

  l: Int64

):Boolean;

function Odd(

  l: QWord

):Boolean;

Description

Odd returns True if X is odd, or False otherwise.

Errors

None.

See also

Abs

  

Calculate absolute value

Ord

  

Return ordinal value of an ordinal type.

Example

Program Example43;

{ Program to demonstrate the Odd function. }

begin
  If Odd(1) Then
    Writeln ('Everything OK with 1 !');
  If Not Odd(2) Then
    Writeln ('Everything OK with 2 !');
end.

Documentation generated on: May 14 2021