Private Function Max2VariantVerify()
' Test the Max2Variant function.
Debug.Assert Max2Variant(2, -2) = 2
Debug.Assert Max2Variant(-2, 2) = 2
' Return leftmost argument.
Debug.Assert VarType(Max2Variant(2&, 2#)) = vbLong
Debug.Assert VarType(Max2Variant(2#, 2&)) = vbDouble
' Perform Binary comparisons.
Debug.Assert Max2Variant("Joe", "JOE") = "Joe"
Debug.Assert Max2Variant("JOE", "Joe") = "Joe"
' Explicit Text comparisons.
Debug.Assert Max2Variant("Joe", "JOE", vbTextCompare) = "Joe"
Debug.Assert Max2Variant("JOE", "Joe", vbTextCompare) = "JOE"
End FunctionCopyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.