On Tue, 26 Mar 2002, Carmen Sandiego wrote:
> Whenever I use StrAToI, the result is always 0.  What am I doing wrong?
>
> char text[8];
>
> StrCopy(text, "Hello");
> Int32 intText = StrAToI(&text);

  of course it is zero.. in this case, you were lucky the address of
  text didn't contain a character between 40 and 49 :P

>  Int32 intText = StrAToI(text);

  is how it should have been, and, it will still return zero..
  StrAToI converts numeric characters 0,1..9 :) into a number.
  as soon as it cannot convert, it stops.

// az
[EMAIL PROTECTED]
http://www.ardiri.com/


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

Reply via email to