Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread bearophile
Jarrett Billingsley Wrote: > Bahahaha, oh comma exps. Their usage will need to be quite regulated in D (using them for smarter purposes is a cute idea, but it may impair C compatibility). Bye, bearophile

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Jarrett Billingsley
On Thu, Oct 8, 2009 at 10:05 PM, Christopher Wright wrote: > Justin Johansson wrote: >> >> Jarrett Billingsley Wrote: >> >>> On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson wrote: I almost have to apologize for this question but .. How does one initialize a static rectangular

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Ellery Newcomer
Justin Johansson wrote: > Jarrett Billingsley Wrote: > >> On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson 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], .size

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Christopher Wright
Justin Johansson wrote: Jarrett Billingsley Wrote: On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson wrote: I almost have to apologize for this question but .. How does one initialize a static rectangular array (2-d matrix) in D1? None of the following or other variations that I've tried com

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Justin Johansson
Jarrett Billingsley Wrote: > On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson wrote: > > I almost have to apologize for this question but .. > > > > How does one initialize a static rectangular array (2-d matrix) in D1? > > > > None of the following or other variations that I've tried compile wit

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Justin Johansson
Jarrett Billingsley Wrote: > On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson wrote: > > I almost have to apologize for this question but .. > > > > How does one initialize a static rectangular array (2-d matrix) in D1? > > > > None of the following or other variations that I've tried compile wit

Re: How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Jarrett Billingsley
On Thu, Oct 8, 2009 at 8:10 PM, Justin Johansson wrote: > I almost have to apologize for this question but .. > > How does one initialize a static rectangular array (2-d matrix) in D1? > > None of the following or other variations that I've tried compile with DMD > 1.0. > > int[2, 3] matrix = [ 1

How initialize a static rectangular array (2-d matrix)

2009-10-08 Thread Justin Johansson
I almost have to apologize for this question but .. How does one initialize a static rectangular array (2-d matrix) in D1? None of the following or other variations that I've tried compile with DMD 1.0. int[2, 3] matrix = [ 1, 2, 3, 4, 5, 6 ]; int[2, 3] matrix = [[ 1, 2, 3 ], [ 4, 5, 6 ]];