Am 08.01.2011 21:53, schrieb Iain Buclaw:
== 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

(D1 code):
import std.stdio;

void main(string[] args) {
        if(args.length > 1)
                if(args.length > 2)
                        writefln("foo");
                else
                        writefln("bar");
}

cae...@mancubus:/tmp $ ./test
cae...@mancubus:/tmp $ ./test a
bar
cae...@mancubus:/tmp $ ./test a b
foo

Reply via email to