Really this is pretty easy (this does NO error checking, and only accepts upper
case characters):
int hex (char ascii)
{
int value;
value = ascii - '0';
if (value > 9)
value += '0' - 'A' + 0x0A;
return value;
}
Improvements are left as an exercise for the reader/student.
--
Sorry,
No signature at the moment.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ