MC-Basic:SGN

From SoftMC-Wiki
Revision as of 16:00, 13 December 2010 by Arwiebe (talk | contribs) (Created page with '{{MC-Basic |SHORT FORM= |SYNTAX= SGN(''<expression>'') |AVAILABILITY= All versions |DESCRIPTION= This function returns the sign of the expression.<br> If ''<expression> ''i…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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)