Hi,
I´ve got a problem with StrAToI. I´ve got the following code for Palm OS 5.4 on
a T5:
UInt32 TextUtilsExtractVersion(const Char *pSourceStr, const UInt32 *pPos)
{
UInt32 i = *pPos;
UInt16 len = StrLen(pSourceStr);
Boolean leave = false;
UInt32 ret = 0;
char digit;
//search for first numeric character
while ( !leave && i < len)
{
digit = *(pSourceStr+i);
if (TxtCharIsDigit(digit))
{
FrmCustomAlert(CUSTOMALERT, "Number found", &digit, " ");
ret += StrAToI(&digit);
}else
{
if (ret!=0) leave = true;
}
i++;
}
return ret;
}
TxtCharIsDigit(digit) found a numeric character but StrAToI returns 0. Why?
Regards
Arne
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/