Splitter quiz / survey

Derek Parnell derek at psych.ward
Mon Apr 27 14:25:21 PDT 2009


On Sun, 26 Apr 2009 19:36:33 -0700, Brad Roberts wrote:

> 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);

I picked (4) ... then read Andrei's response.

> choice 4)
>   x =
>   x = a
>   x = b
>   x =

I see the delimiter as a separator and not a terminator, because the
function name is "splitter" which I see as meaning to separate into
component parts. Thus the delimiter is a separator.

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell



More information about the Digitalmars-d mailing list