Difference between revisions of "MC-Basic:SGN"
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages|MC-Basic:SGN}} | ||
{{MC-Basic | {{MC-Basic | ||
|SHORT FORM= | |SHORT FORM= | ||
Line 4: | Line 5: | ||
|SYNTAX= | |SYNTAX= | ||
− | SGN('' | + | SGN(<''expression''>) |
|AVAILABILITY= | |AVAILABILITY= | ||
Line 22: | Line 23: | ||
|RANGE= | |RANGE= | ||
− | + | ± Max Double | |
|UNITS= | |UNITS= | ||
Line 34: | Line 35: | ||
|LIMITATIONS= | |LIMITATIONS= | ||
− | Read | + | Read only |
|EXAMPLE= | |EXAMPLE= | ||
Line 43: | Line 44: | ||
|SEE ALSO= | |SEE ALSO= | ||
− | [[Category | + | [[Category:MC-Basic:Arithmetic Functions|SGN]] |
}} | }} |
Latest revision as of 05:38, 28 April 2017
Language: | English • 中文(简体) |
---|
This function returns the sign of the expression.
If <expression> is positive, SGN returns +1
If <expression> is zero, SGN returns 0.
If <expression> is negative, SGN returns -1
Syntax
SGN(<expression>)
Availability
All versions
Type
Double
Range
± Max Double
Scope
Configuration, Task or Terminal
Limitations
Read only
Examples
?SGN(Var1)
I = SGN(Var2)