I confused my question I am trying to convert from a Hexadecimal to a
decimal.

Going the other way is even easier than that because all you have to do it
use sprintf(string,"%X",interger) then convert the string from a ASCII to an
integer.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Peter
Epstein
Sent: Thursday, June 08, 2000 7:25 PM
To: Palm Developer Forum
Subject: Re: Help with StrATOI

I don't think Palm OS includes any code for converting a number to hex, but
it's easy enough to write yourself: And off 4 bits at a time, use it to
index into "0123456789ABCDEF", shift right 4, and repeat. This gives the hex
digits in reverse order, so store them in the output string starting with
the last character and working back to the first.
--
Peter Epstein
Palm Inc. Developer


--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to