On Sat, 08 Jan 2011 20:53:20 +0000, Iain Buclaw wrote: > == Quote from Ellery Newcomer (ellery-newco...@utulsa.edu)'s article >> On 01/08/2011 02:37 PM, Iain Buclaw wrote: >> > >> > Never let indentation fool you, the else clause will be assumed to be >> > for the first condition. :o) >> I don't believe you > > Are you saying it *isn't* interpreted as: > > if (i) > if (j) > printf("J true\n"); > else > printf("I false\n"); > > > :o
>From the grammar: "The 'dangling else' parsing problem is solved by associating the else with the nearest if statement." http://www.digitalmars.com/d/2.0/statement.html#IfStatement -Lars