STRING (decimal format) into INTEGER
This function converts a STRING in decimal format into a value of the data type INT.
Input
Input data type
Output
Conversion result
If the required data type is supported, we recommend using the overloaded instruction TO_INT
Thereby the attached string is first converted into a value of the data type STRING[32]. Finally this is converted into a value of the data type INT via a sub-programm of approx. 270 steps that is also used in the functions STRING_TO_INT, STRING_TO_WORD, STRING_TO_DINT and STRING_TO_DWORD.
Permissible format: '[Space][Sign][Decimal numbers][Space]' e.g. ' 123456 '
Permissible characters:
Space
Sign "+" (plus), "-" (minus)
Decimal numbers "0 - 9"
The analysis ends with the first non-decimal number.