Justin Johansson wrote:
> Jarrett Billingsley Wrote:
> 
>> On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson <n...@spam.com> wrote:
> 
> Thanks Jarrett.
> 
> Am I having a blonde day?
> 
>    int[2,3] m = [ 1, 2, 3 ]; 
>    writefln( "m=%s, .sizeof=%d", m, m.sizeof);
> 
> Compiles and prints:
> 
> m=[1,2,3], .sizeof=12
> 
> So what does that declaration, int[2,3], mean?
> 
> Think this is what threw me initially.
> 
> Thanks, Justin
> 

It probably means DMD isn't doing enough validation checking.

Comma expression, hence typeof(m) is int[3], m.sizeof is 3 * int.sizeof

Reply via email to