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

Min

Return smallest of two values.

Declaration

Source position: math.pp line 157

function Min(

  a: Integer;

  b: Integer

):Integer; overload;

function Min(

  a: Int64;

  b: Int64

):Int64; overload;

function Min(

  a: Single;

  b: Single

):Single; overload;

function Min(

  a: Double;

  b: Double

):Double; overload;

function Min(

  a: Extended;

  b: Extended

):Extended; overload;

Description

min returns the smallest value of Int1 and Int2;

Errors

None.

See also

max

  

Return largest of 2 values

Example

Program Example29;

{ Program to demonstrate the min function. }

Uses math;

Var
  A,B : Cardinal;

begin
  A:=1;b:=2;
  writeln(min(a,b));
end.

Documentation generated on: Sep 28 2017