Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

question conversion

jbarrio
2017-09-21
2017-09-22
  • jbarrio - 2017-09-21

    hello:

    is there any way to convert a string that has alphanumeric characters to an int or real variable.
    example
    alis12.3li to 12.3

    thanks.

     
  • Lo5tNet - 2017-09-21

    My guess is you would need to write a function that goes through each character to determine if it is a number or not. If that character is a number store it in a temporary value until the whole string is done then spit out the temporary value. Don't know of any function that is already available.

     
  • jbarrio - 2017-09-22

    ok,
    thanks is working...

     

Log in to post a comment.