Reports whether a number is negative, zero, or positive.
Sign ( n )
Argument |
Description |
---|---|
n |
The number for which you want to find out the sign |
Integer. Returns a number (-1, 0, or 1) indicating the sign of n. If n is null, Sign returns null.
This statement returns 1 (the number is positive):
Sign(5)
This statement returns 0 (zero has no sign):
Sign(0)
This statement returns -1 (the number is negative):
Sign(-5)
Sign method for DataWindows in the DataWindow Reference