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

AVEVA™ InTouch HMI

StringToIntg()

  • Last UpdatedSep 24, 2024
  • 1 minute read

将字符串的数字值转换为整数值,并返回结果。

类别

字符串型

语法

IntegerResult = StringToIntg( Text );

参数

文本

函数处理的字符串。实际字符串或字符串属性。

附注

对此语句求值时,系统会读取字符串的第一个字符作为数字值。如果第一个字符不是数字,则会将字符串求值为零 (0)。空格会被忽略。如果第一个字符是数字,则系统会继续读取后续字符,直到检测到非数字值。

示例

StringToIntg("ABCD"); ‘ 返回 0;

StringToIntg("22.2 is the Value"); ‘ 返回 22(因为整数是整个数字);

StringToIntg("The Value is 22"); ‘ 返回 0;

另请参阅

StringASCII()

StringChar()

StringFromIntg()

StringFromReal()

StringFromTime()

StringInString()

StringLeft()

StringLen()

StringLower()

StringMid()

StringReplace()

StringRight()

StringSpace()

StringTest()

StringToReal()

StringTrim()

StringUpper()

Text()

In This Topic
Related Links