Sgn (function)
Syntax | Sgn (number) |
Description | Returns an Integer indicating whether a number is less than, greater than, or equal to 0. |
Comments | Returns 1 if number is greater than 0. Returns 0 if number is equal to 0. Returns ???1 if number is less than 0. The number parameter is a numeric expression of any type. If number is Null , then a runtime error is generated. Empty is treated as 0. |
Example |
This example tests the product of two numbers and displays a message based on the sign of the result.
|
See Also | Abs (function). |