Splitter quiz / survey

Lionello Lunesu lionello at lunesu.remove.com
Sun Apr 26 22:25:05 PDT 2009


"Brad Roberts" <braddr at puremagic.com> wrote in message 
news:mailman.1196.1240799812.22690.digitalmars-d at puremagic.com...
> Without looking at the docs, code, or compiling and running a test, what 
> will
> this do:
>
>    foreach(x, splitter(",a,b,", ","))
>        writefln("x = %s", a);
>

Is it a trick question?

Replacing , with ; and a with x: there are 3 comma's, so I'd expect 
4 outputs:

>  x =
>  x = a
>  x = b
>  x =

ie. choice 4? 




More information about the Digitalmars-d mailing list