<-- Previous || Up || Next -->

Min 2 Variant Function
Math Reals Class

Public Function Min2Variant( _
      ByVal vX As Variant _
    , ByVal vY As Variant _
    , Optional ByVal vCompare As Variant _
    ) As Variant

"Minimum Of Two Variant Values"
Return the minimum of two arguments.
Returns argument on left if arguments are equal.

Examples:
    Min2Variant(23, 45) = 23
    Min2Variant(-12, 4) = -12
    Min2Variant(2%, 2#) = 2%
    Min2Variant(2#, 2%) = 2#
    Min2Variant("SA", "RO") = "RO"
    Min2Variant("sa", "RO") = "sa"
    Min2Variant("sa", "RO", vbTextCompare) = "RO"
See also:
    Min2VariantVerify Subroutine
    Min2Real Function
    Min3Variant Function
    Max2Variant Function
    Min2 Function
vX: First of two values, the minimum of which will be returned.
vY: Second of two values, the minimum of which will be returned.
vCompare: specifies the type of string comparison used to determine if strings match. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number.
Note: Arguments are compared using the CompareLikeDataType function; see it for more details of how arguments are fixed up and comparisons are performed.
Note: This function does not support three-valued logic because of the way that the CompareLikeDataType function treats Null values.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.