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

AVEVA™ Plant SCADA

StringToIntg()

  • Last UpdatedJul 13, 2023
  • 1 minute read

Converts the numeric value of a string to an integer value and returns the result.

Category

String

Syntax

IntegerResult = StringToIntg( Text );

Parameter

Text

String that function acts on. Actual string or a string equipment.item.

Remarks

When this statement is evaluated, the system reads the first character of the string for a numeric value. If the first character is other than a number, the string's value is equated to zero (0). Blank spaces are ignored. If the first character is a number, the system continues to read the subsequent characters until a non-numeric value is detected.

Examples

StringToIntg("ABCD"); ' returns 0;

StringToIntg("22.2 is the Value"); ' returns 22 (since integers are whole numbers);

StringToIntg("The Value is 22"); ' returns 0;

See Also

StringASCII(), StringChar(), StringFromIntg(), StringFromReal(), StringFromTime(), StringInString(), StringLeft(), StringLen(), StringLower(), StringMid(), StringReplace(), StringSpace(), StringTest(), StringToReal(), StringTrim(), StringUpper(), Text()

String Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in