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

AVEVA™ Plant SCADA

StrToInt

  • Last UpdatedJul 18, 2023
  • 1 minute read

Converts a string into an integer. This function will search the string for the first non-blank character, and then start converting until it finds the end of the string or a non-numeric character. If the first non-blank character is not a numeric character (0-9), a space, a " + " or a " - " sign, the return value is 0 (zero).

Syntax

StrToInt(String)

String:

The string to convert.

Return Value

An integer (converted from String).

StrToReal, StrToValue

Example

Variable=StrToInt("45");

! Sets Variable to 45.

Variable=StrToInt("45.23");

! Sets Variable to 45.

Variable=StrToInt("A45");

! Sets Variable to 0.

See Also

String Functions

Using the Caret Escape Sequence Character

Converting and Formatting Cicode Variables

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