| Table plus |
|---|
| applyColStyleToCell | true |
|---|
| heading | 0 |
|---|
| columnTypes | s,s,s,s |
|---|
| multiple | false |
|---|
| columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
|---|
| enableSorting | false |
|---|
|
Syntax | sign(number) | Package | | Alias | | Pkg Usage | | |
Description
| Excerpt |
|---|
|
| Determines the sign of a number (signum). |
Determines the sign of a number (signum). Returns 1 if the number is positive, zero (0) if the number is 0, and -1 if the number is negative.
Parameters
| Table plus |
|---|
| applyColStyleToCell | true |
|---|
| columnTypes | s,s,s,s |
|---|
| heading | 0 |
|---|
| multiple | false |
|---|
| enableSorting | false |
|---|
|
Parameter name | Type | Required | Description |
|---|
number | Number | Yes | Any real number. | |
Return Type
Number
Example
| Code Block |
|---|
|
number a = sign(3);
print("a= " + a);
number b = sign(-4);
print("b= " + b);
number c = sign(3-3);
print("b= " + c); |
Prints:
a= 1;
b= -1;
c= 0;
See also
| Filter by label |
|---|
| showLabels | false |
|---|
| max | 25 |
|---|
| showSpace | false |
|---|
| cql | label = "math_routine" and space = currentSpace ( ) |
|---|
| labels | array_routines |
|---|
|
We've encountered an issue exporting this macro. Please try exporting again later.