Reports whether the number is negative, zero, or positive by checking its sign.
Sign ( n )
Argument |
Description |
---|---|
n |
The number for which you want to determine the sign |
Integer. Returns a number (-1, 0, or 1) indicating the sign of n.
This expression returns 1 (the number is positive):
Sign(5)
This expression returns 0:
Sign(0)
This expression returns -1 (the number is negative):
Sign(-5)