Private Function MaxRealVerify() ' Test the MaxReal function. Debug.Assert MaxReal(2, 0, -2) = 2 Debug.Assert MaxReal(-2, 2, 0) = 2 Debug.Assert MaxReal(0, -2, 2) = 2 Debug.Assert MaxReal(-4, -2.2, 0, 2.2, 4) = 4 Debug.Assert MaxReal(4, -2.2, 0, 2.2, -4) = 4 ' Return leftmost argument. Debug.Assert VarType(MaxReal(2&, 2#, 2!)) = vbLong Debug.Assert VarType(MaxReal(2#, 2!, 2&)) = vbDouble Debug.Assert VarType(MaxReal(2!, 2&, 2#)) = vbSingle ' Perform Binary comparisons. Debug.Assert MaxReal("Joe", "JOE", "Bud") = "Joe" Debug.Assert MaxReal("Bud", "Joe", "JOE") = "Joe" Debug.Assert MaxReal("JOE", "Bud", "Joe") = "Joe" End Function
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.