Applies To:
  • CitectSCADA
  • CitectHMI

Summary:
I have a large integer represented in scientific notation as a string. StrToInt() does not convert numbers in scientific notation correctly. How can I convert strings in scientific notation to integers? 

Solution:
Strings in scientific notation cannot be directly converted into integers using StrToInt(). If you try it, the number gets truncated after the first non-numeric character in the string.

If you need to use a number in scientific notation as a number, you can convert it to a REAL using StrToReal(). The REAL data type supports numbers in the range from -3.4E38 to 3.4E38.

 

Keywords:
 

Attachments