Max
Return largest of 2 values
Declaration
Source position: math.pp line 174
function Max(a: Integer; b: Integer) : Integer; Overload;
function Max(a: Int64; b: Int64) : Int64; Overload;
function Max(a: QWord; b: QWord) : QWord; Overload;
function Max(a: Single; b: Single) : Single; Overload;
function Max(a: Double; b: Double) : Double; Overload;
function Max(a: Extended; b: Extended) : Extended; Overload;
Description
Max returns the maximum of Int1 and Int2.
Errors
None.
See also
Name | Description |
---|---|
maxIntValue | Return largest element in integer array |
maxvalue | Return largest value in array |
min | Return smallest of two values. |
Example
Program Example24;
{ Program to demonstrate the max function. }
Uses math;
Var
A,B : Cardinal;
begin
A:=1;b:=2;
writeln(max(a,b));
end.