Sgn Function
Returns an integer number between -1 and 1 that indicates if the number that is passed to the function is positive, negative, or zero.
தொடரமைப்பு:
Sgn (Number)
Return value:
Integer
அளவுருக்கள்:
Number: Numeric expression that determines the value that is returned by the function.
NumExpression |
Return value |
negative |
Sgn returns -1. |
0 |
Sgn returns 0. |
positive |
Sgn returns 1. |
எடுத்துக்காட்டு:
Sub ExampleSgn
Print sgn(-10) ' returns -1
Print sgn(0) ' returns 0
Print sgn(10) ' returns 1
End Sub