This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Add two strings

Hallo,
Is it possible, that I can add the strings '1' '.' and '2'.
I want to add this 3 strings: 1.2 and convert it into a float value and than I want add a float value.

Parents
  • "My problem is"

    Your problem is that you have still not understood the nature of a string, and the difference between strings and numerical values.

    "I get form the MDU"

    What is an "MDU"?

    A string is, by definition, for text - in C251, that means ASCII-coded characters.

    To do arithmetic, you need numerical values such as int or float.

    Standard library functions exist to convert between strings & numerical values - look them up!
    Alternatively, write your own.

Reply
  • "My problem is"

    Your problem is that you have still not understood the nature of a string, and the difference between strings and numerical values.

    "I get form the MDU"

    What is an "MDU"?

    A string is, by definition, for text - in C251, that means ASCII-coded characters.

    To do arithmetic, you need numerical values such as int or float.

    Standard library functions exist to convert between strings & numerical values - look them up!
    Alternatively, write your own.

Children
No data