Private Function ModAltVerify() ' Test the ModAlt function. Debug.Assert ModAlt(5, 3) = 2 Debug.Assert ModAlt(4, 3) = 1 Debug.Assert ModAlt(3, 3) = 0 Debug.Assert ModAlt(2, 3) = 2 Debug.Assert ModAlt(1, 3) = 1 Debug.Assert ModAlt(0, 3) = 0 Debug.Assert ModAlt(-1, 3) = 2 Debug.Assert ModAlt(-2, 3) = 1 Debug.Assert ModAlt(-3, 3) = 0 Debug.Assert ModAlt(-4, 3) = 2 Debug.Assert ModAlt(-5, 3) = 1 Debug.Assert ModAlt(5, -3) = -1 Debug.Assert ModAlt(4, -3) = -2 Debug.Assert ModAlt(3, -3) = 0 Debug.Assert ModAlt(2, -3) = -1 Debug.Assert ModAlt(1, -3) = -2 Debug.Assert ModAlt(0, -3) = 0 Debug.Assert ModAlt(-1, -3) = -1 Debug.Assert ModAlt(-2, -3) = -2 Debug.Assert ModAlt(-3, -3) = 0 Debug.Assert ModAlt(-4, -3) = -1 Debug.Assert ModAlt(-5, -3) = -2 Debug.Assert ModAlt(2.5, 1.5) = 1 Debug.Assert ModAlt(2, 1.5) = 0.5 Debug.Assert ModAlt(1.5, 1.5) = 0 Debug.Assert ModAlt(1, 1.5) = 1 Debug.Assert ModAlt(0.5, 1.5) = 0.5 Debug.Assert ModAlt(0, 1.5) = 0 Debug.Assert ModAlt(-0.5, 1.5) = 1 Debug.Assert ModAlt(-1, 1.5) = 0.5 Debug.Assert ModAlt(-1.5, 1.5) = 0 Debug.Assert ModAlt(-2, 1.5) = 1 Debug.Assert ModAlt(-2.5, 1.5) = 0.5 Debug.Assert IsNull(ModAlt(Null, 3)) Debug.Assert IsNull(ModAlt("Joe", 3)) Debug.Assert IsNull(ModAlt(3, Null)) Debug.Assert IsNull(ModAlt(3, "Joe")) End Function
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.