You'd expect to find scanf() next to printf() [StrPrintF()], but PalmOS is
oddly non-orthogonal (and a bunch of other clinical sounding things, too);

Try something like this:

UInt32 StrHToI(const char *str)
{
 UInt32 value = 0;
 while (1)
 {
  char c = *str++ - '0';
  if (c < 0)
   break;
  if (c > 9)
  {
   c -= (c < 49) ? 7 : 39;
   if (c < 10 || c > 15)
    break;
  }
  value = (value << 4) + c;
 }
 return value;
}



On Tue, Apr 1, 2008 at 3:00 AM, David Birdsall <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> You could always write it yourself?
>
> Did you do a search on Google?
>
> "hexadecimal string to decimal number conversion"
>
> There's a couple of routines on this page, maybe they will help you
> along :-
>
> http://bytes.com/forum/thread221005.html
>
> - Dave
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Geetha Arasu
> Sent: 01 April 2008 10:55
> To: Palm Developer Forum
>  Subject: RE: hexadecimal to decimal conversion
>
> Thanks for ur reply!
> But StrItoH is for converting decimal to hexadecimal... I need the
> reverse process.. I don't find any?
>
> Anyn idea?
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Luc Le Blanc
> Sent: Tuesday, April 01, 2008 4:56 PM
> To: Palm Developer Forum
> Subject: Re: hexadecimal to decimal conversion
>
> Edward Jones wrote:
>
> > Will StrVPrintF (p907 of the Palm OS Ref) do this?
>
> > Geetha Arasu wrote:
> > > Is there any builtin function in palm to convert hexadecimal to
> > > decimal?
>
>
> Or StrItoH.
>
>
> Luc Le Blanc
> --
> For information on using the ACCESS Developer Forums, or to unsubscribe,
> please see http://www.access-company.com/developers/forums/
>
>
>
> --
> For information on using the ACCESS Developer Forums, or to unsubscribe,
> please see http://www.access-company.com/developers/forums/
>
> --
> For information on using the ACCESS Developer Forums, or to unsubscribe,
> please see http://www.access-company.com/developers/forums/
>



-- 
[Jeff Loucks, Gig Harbor, WA, USA]

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to