[chuck-users] Std.atoi broken?

Atte André Jensen atte.jensen at gmail.com
Mon Nov 27 12:24:42 EST 2006


Hi

I might be doing something wrong, but it seems to me that atoi is
behaving a bit strange...

<<<Std.atoi("a")>>>;
<<<Std.atoi("b")>>>;
<<<Std.atoi("c")>>>;
<<<Std.atoi("d")>>>;

prints:

0 :(int)
0 :(int)
0 :(int)
0 :(int)

Am I doing something wrong or are my expectations (97-100) for atoi out
of proportions?

What I'm trying to do is convert from the "a" to 97 as read by
KBHit->getchar() and back. This also means that I've been looking for
itoa, which I couldn't find.

-- 
peace, love & harmony
Atte

http://www.atte.dk      | quintet:      http://www.anagrammer.dk
                         | compositions: http://www.atte.dk/compositions




More information about the chuck-users mailing list