Sign function
Syntax
Sign(n)
Description
Use the Sign function to determine the sign of a number.
Parameters
| Parameter | Description |
|---|---|
|
n |
A number value of which to determine the sign. |
Returns
Returns a number value equal to:
-
1 if n is positive
-
0 if n is 0
-
-1 if n is negative
Example
The example sets &NUMSIGN to 1:
&NUMSIGN = Sign(25);
Related Topics