Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

Sgn()

  • Last UpdatedSep 24, 2024
  • 1 minute read

确定值的符号(正、零、负)并返回结果。

类别

数学

语法

IntegerResult = Sgn( Number );

参数

编号

任何数字或数值属性。

返回值

如果输入编号为正数,则结果为 1。负数返回 -1,0 返回 0。

示例

Sgn(425); ' 返回 1;

Sgn(0); ' 返回 0;

Sgn(-37.3); ' 返回 -1;

In This Topic
Related Links