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

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

Re: [avr-gcc-list] Should this code work? 4.1.1


From: Bob Paddock
Subject: Re: [avr-gcc-list] Should this code work? 4.1.1
Date: Sat, 3 Mar 2007 06:11:28 -0500
User-agent: KMail/1.9.5

On Friday 02 March 2007 21:29, Graham Davies wrote:
> Bob Paddock wrote:
> < for(;;){} is a endless loop, how is "until execution of that
> > block ends in any way." being fulfilled here?
> 
> The block begins with the open brace and ends with the close brace.  The 
> block ends when control falls out of the bottom

The "falls out" is the issue with me, as I see the {} as being "contained 
within",
the "}" was never crossed, so to me it was still the same {} block.  I could not
find this "reinitialize" issue in my old K&R book?

>  and for ( ; ; )  If instead you write while ( true ) it is easier to see 
> where 
> control goes when it leaves the block at the bottom.

I don't see while(true){} being any different than for(;;){}
in this context, and while(true){} causes the Lint error
of "evaluation of constant value boolean".




reply via email to

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