Promotic

Sign - method of the Pm object

Description:
Returns an integer indicating the sign of a number.
Syntax:
Long Sign(Double nValue)
Parameters:
nValue(Double) Any valid numeric expression.
Return value:
1 - greater than 0
0 - equal to 0
-1 - less than 0
Note:
This method is functional also in Macro expression $.expr and in the onDraw event of the PmgCanvas object.
This method is also functional in Web panels.
Example:
JavaScriptVBScriptSelect and copy to clipboard

var nVar1 = 12;
var nVar2 = -2.4;
var nVar3 = 0;
var nSign = Pm.Sign(nVar1);   // Returns 1
nSign = Pm.Sign(nVar2);   // Returns -1
nSign = Pm.Sign(nVar3);   // Returns 0

History:
Pm8.02.01: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Sign
 
 
- Sin
- Tan
© MICROSYS, spol. s r.o.