Sgn Function
Syntax
Sgn(Num)
Group
Math
Description
Return the sign.
Parameter |
Description |
Num
|
Return the sign of this numeric
value. Return -1 for negative. Return 0 for zero. Return 1 for positive.
|
Example
Sub Main
Debug.Print Sgn(9) ' 1
Debug.Print Sgn(0) ' 0
Debug.Print Sgn(-9) '-1
End Sub