Hi,
> Code that doesn't work:
>
> main ()
> {
> unsigned int val;
> unsigned int otherval;
>
> val = 650;
>
> while (1)
> {
> while (otherval < val)
otherval is currently uninitialized and will take on some random value
from the stack.
> Code that DOES work:
>
> main ()
> {
> unsigned int otherval;
>
> while (1)
> {
> while (otherval < 650)
otherval is still uninitialized. The fact that it works is pure luck
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/Message
Re: [AVR-Chat] C Code weird behaviour help?
2007-01-27 by Dave Hylands