[Issue 3849] [missing error] Array literal length doesn't match

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 11 07:51:10 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=3849



--- Comment #14 from Stewart Gordon <smjg at iname.com> 2011-09-11 07:50:51 PDT ---
(In reply to comment #13)
> float[6] arr = [1., 2., 42....];
> 
> This is too much ugly,

You don't have to use it then.  You could use
    float[6] arr = [1., 2., 42. ...];
or
    float[6] arr = [1., 2., 42...];
or
    float[6] arr = [1., 2., 42.0...];

instead.

> so I think it's much better to require a comma before the ellipsis.

I made out your intention to be that, with the comma, the remainder of elements
would be initialised to the type's .init.  A ... following a value without a
comma would, OTOH, initialise all remaining elements to the specified value.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list