MinWXYZ Routines
Returns the Minimum of 4 Values.

Unit
QESBPCSMath

Overloaded Variants
Function MinWXYZ(const W, X, Y, Z: Byte): Byte;
Function MinWXYZ(const W, X, Y, Z: ShortInt): ShortInt;
Function MinWXYZ(const W, X, Y, Z: Word): Word;
Function MinWXYZ(const W, X, Y, Z: SmallInt): SmallInt;
Function MinWXYZ(const W, X, Y, Z: LongWord): LongWord;
Function MinWXYZ(const W, X, Y, Z: LongInt): LongInt;
Function MinWXYZ(const W, X, Y, Z: Int64): Int64;
Function MinWXYZ(const W, X, Y, Z: Extended): Extended;
Function MinWXYZ(const W, X, Y, Z: Double): Double;
Function MinWXYZ(const W, X, Y, Z: Single): Single;

Declaration
Function MinWXYZ(const W, X, Y, Z: Byte): Byte;

Parameters
First Value to Process.
Second Value to Process.
Third Value to Process.
Fourth Value to Process.

Category
Arithmetic Routines for Integers
Arithmetic Routines for Floats

Implementation

function MinWXYZ (const W, X, Y, Z: Byte): Byte;
begin
     Result := W;
     if X < Result then
          Result := X;
     if Y < Result then
          Result := Y;
     if Z < Result then
          Result := Z;
End;

Declaration
Function MinWXYZ(const W, X, Y, Z: ShortInt): ShortInt;

Implementation

function MinWXYZ (const W, X, Y, Z: ShortInt): ShortInt;
begin
     Result := W;
     if X < Result then
          Result := X;
     if Y < Result then
          Result := Y;
     if Z < Result then
          Result := Z;
End;

Declaration
Function MinWXYZ(const W, X, Y, Z: Word): Word;

Implementation

function MinWXYZ (const W, X, Y, Z: Word): Word;
begin
     Result := W;
     if X < Result then
          Result := X;
     if Y < Result then
          Result := Y;
     if Z < Result then
          Result := Z;
End;

Declaration
Function MinWXYZ(const W, X, Y, Z: SmallInt): SmallInt;

Implementation

function MinWXYZ (const W, X, Y, Z: SmallInt): SmallInt;
begin
     Result := W;
     if X < Result then
          Result := X;
     if Y < Result then
          Result := Y;
     if Z < Result then
          Result := Z;
End;

Declaration
Function MinWXYZ(const W, X, Y, Z: LongWord): LongWord;

Implementation

function MinWXYZ (const W, X, Y, Z: LongWord): LongWord;
begin
     Result := W;
     if X < Result then
          Result := X;
     if Y < Result then
          Result := Y;
     if Z < Result then
          Result := Z;
End;

Declaration
Function MinWXYZ(const W, X, Y, Z: LongInt): LongInt;

Implementation

function MinWXYZ (const W, X, Y, Z: LongInt): LongInt;
begin
     Result := W;
     if X < Result then
          Result := X;
     if Y < Result then
          Result := Y;
     if Z < Result then
          Result := Z;
End;

Declaration
Function MinWXYZ(const W, X, Y, Z: Int64): Int64;

Implementation

function MinWXYZ (const W, X, Y, Z: Int64): Int64;
begin
     Result := W;
     if X < Result then
          Result := X;
     if Y < Result then
          Result := Y;
     if Z < Result then
          Result := Z;
End;

Declaration
Function MinWXYZ(const W, X, Y, Z: Extended): Extended;

Implementation

function MinWXYZ (const W, X, Y, Z: Extended): Extended;
begin
     Result := W;
     if X < Result then
          Result := X;
     if Y < Result then
          Result := Y;
     if Z < Result then
          Result := Z;
End;

Declaration
Function MinWXYZ(const W, X, Y, Z: Double): Double;

Implementation

function MinWXYZ (const W, X, Y, Z: Double): Double;
begin
     Result := W;
     if X < Result then
          Result := X;
     if Y < Result then
          Result := Y;
     if Z < Result then
          Result := Z;
End;

Declaration
Function MinWXYZ(const W, X, Y, Z: Single): Single;

Implementation

function MinWXYZ (const W, X, Y, Z: Single): Single;
begin
     Result := W;
     if X < Result then
          Result := X;
     if Y < Result then
          Result := Y;
     if Z < Result then
          Result := Z;
End;


HTML generated by Time2HELP
http://www.time2help.com