Sign
PowerScript function
Description
Reports whether a number is negative, zero, or positive.
Syntax
1 |
Sign ( n ) |
Argument |
Description |
---|---|
n |
The number for which you want to find out the sign |
Return value
Integer.
Returns a number (-1, 0, or 1) indicating the sign of n. If n is
null, Sign returns null.
Examples
This statement returns 1 (the number is positive):
1 |
Sign(5) |
This statement returns 0 (zero has no sign):
1 |
Sign(0) |
This statement returns -1 (the number is negative):
1 |
Sign(-5) |
See also
Sign method for DataWindows in the section called “Sign” in DataWindow Reference.
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest