Description
The Sgn() function returns an integer that indicates the sign of a specified number.
This function has the form:
Sgn(number)
Parameter | Description |
---|---|
number | (required) A valid numeric expression If number is:
|
Examples
The following example shows the basic use of this function:
Msgbox(Sgn(15))
Msgbox(Sgn(-5.67))
Msgbox(Sgn(0))
This produces the following result (each line in a separate pop-up message box):
1
-1
0
Miscellaneous Information
Supported in Version: | 1.0 |
---|