Function Math Reals Class

Min2RealVerify

Signature (Visual Basic / VBA)

Private Function Min2RealVerify()
    ' Test the Min2Real function.

    Debug.Assert Min2Real(-2, 2) = -2
    Debug.Assert Min2Real(2, -2) = -2
    
    ' Return leftmost argument.
    Debug.Assert VarType(Min2Real(2&, 2#)) = vbLong
    Debug.Assert VarType(Min2Real(2#, 2&)) = vbDouble

    ' Perform Binary comparisons.
    Debug.Assert Min2Real("Joe", "JOE") = "JOE"
    Debug.Assert Min2Real("JOE", "Joe") = "JOE"

End Function