Private Sub FractionalPartVerify() ' Test the FractionalPartVerify function. Debug.Assert Approx(FractionalPart(1.9), 0.9) Debug.Assert Approx(FractionalPart(1.1), 0.1) Debug.Assert FractionalPart(1) = 0 Debug.Assert FractionalPart(0.9) = 0.9 Debug.Assert FractionalPart(0.1) = 0.1 Debug.Assert FractionalPart(0) = 0 Debug.Assert FractionalPart(-0.1) = -0.1 Debug.Assert FractionalPart(-0.9) = -0.9 Debug.Assert FractionalPart(-22) = 0 Debug.Assert Approx(FractionalPart(-1.1), -0.1) Debug.Assert Approx(FractionalPart(-1.9), -0.9) Debug.Assert IsNull(FractionalPart(Null)) Debug.Assert IsNull(FractionalPart("Joe")) End Sub
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.