Difference between revisions of "MC-Basic:SGN"

From SoftMC-Wiki
Jump to: navigation, search
m (Text replace - "+/- " to "± ")
m (Text replace - "Read-Only" to "Read only")
Line 34: Line 34:
  
 
|LIMITATIONS=
 
|LIMITATIONS=
Read-Only
+
Read only
  
 
|EXAMPLE=
 
|EXAMPLE=

Revision as of 13:42, 18 March 2014

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)

See Also