avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Problem with atol() and strtol()


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Problem with atol() and strtol()
Date: Thu, 10 Jun 2004 15:05:46 +0200 (MET DST)

"Eric Fu" <address@hidden> wrote:

> I'm using WinAVR 20040404.

OK.

> dword is define as   typedef unsigned long    dword;

Then you ought to use strtoul() btw.  But that's probably minor.

> The fact that atoi works and atol() and strtol() don't confuse me.

Me too.  I've been using strtoul() successfully in the past.

> The following is the repeat of my last email:

No need to repeat yourself.  Repeating it doesn't make it more obvious
to me why that might happen, and I've got your previous article right
away here in my newsreader for reference anyway.

Oh:

> The debugging tool shows that uart0.InBuf[] always contain valid
> ASCII digits. However, atol() and strtol() never work.

I hope you didn't only test it with the debugger but also on a real
device?  Just to make sure we aren't going to hunt for optimization
gotchas, or simulator bugs...

-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]