easier way?

bearophile bearophileHUGS at lycos.com
Wed Aug 25 17:32:39 PDT 2010


> In D there are no built-in rectangular arrays.

But probably a nD array struct will be added to Phobos in the following months. You may even write it yourself, for Phobos.

As a less nice alternative, you may use a dynamic array of dynamic arrays and use the function preconditions (design by contract) to assert with a loop that the inputs matrices are indeed rectangular.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list