Doubt - Static multidimension arrays

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 19 05:00:19 PST 2016


On Tuesday, 19 January 2016 at 08:27:56 UTC, tsbockman wrote:

> The only relevant difference between the two, is that the order 
> of the row and column specification is swapped in *the 
> declaration*, not when indexing.

Newcomers to D tend to think in terms of C when they declare 
arrays, so the confusion comes when they find out they have to 
index it in a way that is the reverse of what they expect. Yes, 
it's because the declaration syntax is different, but it's always 
the indexing that trips them up. That's all I meant. It usually 
isn't obvious what the root of the misunderstanding is until 
someone explains it.


More information about the Digitalmars-d-learn mailing list