thank you :)))))

"Matt Graham" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Salli wrote:
> > I'm trying to get hold of the number of seconds since Jan 1, 1904.
> >
> > UInt32 noSecs;
> > char     temp[50];
> >
> > noSecs = TimGetSeconds();
> >
> > why then, when I do an StrIToA(temp,noSecs), does it come back as a
negative
> > number?
>
> TimGetSeconds() returns an _unsigned_ 32 bit int.  StrIToA takes a
> _signed_ 32 bit int.  The number of seconds since 1904 is big enough
> that the most significant bit of the integer is 1, which when treated as
> a signed int, shows up as negative.
>
> Try
> StrPrintF( temp, "%uld", noSecs );
> I think.
>



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

Reply via email to