Returning a single character from a string, returns as a int?(bit operate
#2

This is because the textual representation of a number is different than the number itself. See here: http://www.asciitable.com/index/asciifull.gif
The textual representation of the number 2 is 50, which is exactly what you're describing. You need strval to reconvert it to the numerical value. Not sure if there's better way to do it.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)