Originally created by: Matthias S.
Hello,
I have a problem with the following code:
NumberInString : WSTRING(20) := "16#a"; NumberΒ Β Β Β Β : INT; Number := WSTRING_TO_INT(NumberInString);
I expect the value decimal 10 but I get the value 37. What am I doing wrong?
Thanks in advance for your help.
Best regards, Matthias
wstring name is fault and the first character is a 1 giving 37 use only the A int he string
Hi Matthias,
You should use capital letters. "16#A" will return 10.
Hello TimvH, shooter,
thank you for your help.
The solution is OK, but I think "a" and "A" should both work. But for now it's OK.
Thanks, Matthias
Log in to post a comment.
Originally created by: Matthias S.
Hello,
I have a problem with the following code:
I expect the value decimal 10 but I get the value 37.
What am I doing wrong?
Thanks in advance for your help.
Best regards,
Matthias
wstring name is fault and the first character is a 1 giving 37
use only the A int he string
Hi Matthias,
You should use capital letters. "16#A" will return 10.
Originally created by: Matthias S.
Hello TimvH, shooter,
thank you for your help.
The solution is OK, but I think "a" and "A" should both work.
But for now it's OK.
Thanks,
Matthias