Skip to content

Commit 9d60af3

Browse files
authored
Update 756-math-sgn.markdown
1 parent 1c90114 commit 9d60af3

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

_build/reference/756-math-sgn.markdown

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@
22

33
> SGN (x)
44
5-
Sign of x (+1 for positive, -1 for negative and 0 for zero).
5+
Sign of x (+1 for positive, -1 for negative and 0 for zero). SGN cannot accept a numeric string, such as "24", as an argument.
66

7-
Built-in: SGN
8-
Syntax: SGN(numeric-expression)
9-
Description: SGN returns a value indicating the sign of a numeric expression (1 if the
10-
expression is positive, 0 if it is zero, or -1 if it is negative).
11-
Comment: SGN cannot accept a numeric string, such as "24", as an argument.
12-
Example:
13-
PRINT SGN(1), SGN(-1), SGN(0) ' Output is: 1 -1 0
14-
PRINT SGN(CINT("-2")) ' Output is: -1
15-
PRINT SGN("2 + 1") ' Error
16-
See Also: ABS, ABSMAX, ABSMIN, CINT
7+
```
8+
PRINT SGN(2), SGN(-2), SGN(0) ' Output is: 1 -1 0
9+
PRINT SGN(INT("-2")) ' Output is: -1
10+
```
1711

0 commit comments

Comments
 (0)