UNIT MaxMin
Routines:
Max
MaxFloat
MaxInteger
MaxOf
Min
MinFloat
MinInteger
MinOf
SwapInt
SwapLong
Routine Max
Declaration: function Max(A, B: Longint): Longint;
The Max function returns the largest of two longint values A and B.
Max example:
I1 := Max(I1, I2);
Routine MaxFloat
Declaration: function MaxFloat(const Values: array of
Extended): Extended;
The MaxFloat function returns the largest signed value in the Values array.
MaxFloat example:
MaxVal := MaxFloat([MaxVal, -1, 12.2, 3.36, 12.438]);
Routine MaxInteger
Declaration: function MaxInteger(const Values: array of
Longint): Longint;
The MaxInteger function returns the greatest longint value in the Values array.
MaxInteger example:
MaxVal := MaxInteger([MaxVal, 1, 12, 36, 43]);
Routine MaxOf
Declaration: function MaxOf(const Values: array of
Variant): Variant;
The MaxOf function returns the greatest value in the Values
array.
MaxOf example:
MaxVal := MaxOf([MaxVal, -1, 12.2, 3.36, 12.438]);
Routine Min
Declaration: function Min(A, B: Longint): Longint;
The Max function returns the smallest of two longint values A and B.
Min example:
I1 := Min(I1, I2);
Routine MinFloat
Declaration: function MinFloat(const Values: array of
Extended): Extended;
The MinFloat function returns the smallest signed value in the Values array.
MinFloat example:
MinVal := MinFloat([MinVal, -1, 12.2, 3.36, 12.438]);
Routine MinInteger
Declaration: function MinInteger(const Values: array of
Longint): Longint;
The MinInteger function returns the smallest longint value in the Values array.
MinInteger example:
MinVal := MinInteger([MinVal, 1, 12, 36, 43]);
Routine MinOf
Declaration: function MinOf(const Values: array of
Variant): Variant;
The MinOf function returns the smallest value in the Values array.
MinOf example:
MinVal := MinOf([MinVal, -1, 12.2, 3.36, 12.438]);
Routine SwapInt
Declaration: procedure SwapInt(var Int1, Int2: Integer);
Exchange the values in two integers Int1 and Int2.
SwapInt example:
SwapInt(I1, I2);
Routine SwapLong
Declaration: procedure SwapLong(var Int1, Int2:
Longint);
Exchange the values in two long integers Int1 and Int2.
SwapLong example:
SwapLong(I1, I2);
Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000