Sign in to follow this  
Followers 0
juance

STRING_TO_INT() function

3 posts in this topic

Hi all: I am trying to figure out what is the result of converting an string to an int using STRING_TO_INT() function. For example: integer := STRING_TO_INT('A'); What is the converted value ? What is the conversion criteria this function uses ?. There's not information in the manual. Thanks!

Share this post


Link to post
Share on other sites
Hi Juace, What is the value of the string you are trying to convert and for what reason, is it an ascii string ?.I've never done this on CX programmer but I have done it in other software packages so I may be able to help. Also what are you planning to do with this string ?

Share this post


Link to post
Share on other sites
My understanding of that command is that it converts a string of numeric data into an actual number. Say for example you read a barcode serially. It's stored as ASCII string. That command converts the number in the string to an integer. So string '1234' can be converted to the integer 1234.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0