<-- Previous || Up || Next -->

Num Comp Function
Math Arithmetic Class

Public Function NumComp( _
      ByVal vA As Variant _
    , ByVal vB As Variant _
    ) As Variant

"Number Compare" or "Numeric Comparison"
Determine if one number is less than, equal to, or greater than the other.
Returns -1 if A < B; 0 if A = B; 1 if A > B.

Summary:
    A < B: Return -1.
    A = B: Return 0.
    A > B: Return 1.
Examples:
    NumComp(3, 4) = -1
    NumComp(4, 4) = 0
    NumComp(5, 4) = 1
See also:
    RangeComp Function
    Sign Function
    Sgn Function (Visual Basic)
Definition:
    Sgn(A - B)
vA: First of the two numbers that are compared to see if it is less than, equal to, or greater than the other. Function returns Null if vA is Null or cannot be fixed up to a number.

vB: Second of the two numbers that are compared to see if it is less than, equal to, or greater than the other. Function returns Null if vA is Null or cannot be fixed up to a number.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.