You could try StrAToI in a loop.  Something like,

char    nextChStr[2],
        *numberStr;
long    number = 0;
//      allocate memory for numberStr and initialize.

while   (*numberStr != '\0') {
        StrNCopy (nextChStr, numberStr, 1);
        number *= 16;
        if      (*nextChStr > '9')      //      doesn't do error checking
                switch  (*nextChStr) {
                case    'a':
                case    'A':
                        number += 10;
                        break;
                etc.
                }
        else
                number += StrA (nextChStr);
        numberStr++;
}

You'll have to refine it, but hope it helps.

Regards,

Steve

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 02, 2000 10:53 AM
To: Palm Developer Forum
Subject: strtol function


Greetings.  Has anyone created an alternative to the standard C function
strtol which isn't supported by the Palm OS?  I trying to convert a routine
to manipulate hexidecimal character strings to run on the Palm but I can't
get there.  Any help is greatly appreciated.

Steve





_______________________________________________________
Get 100% FREE Internet Access powered by Excite
Visit http://freeworld.excite.com


-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to