Noel Chiappa wrote:
From: Doug
McIlroy
the absence of multidemensional arrays in C.
?? From the 'C Reference Manual' (no date, but circa 'Typesetter C'),
pg. 11:
"If the unadorned declarator D would specify an n-dimensional array .. then
the declarator D[in+1] yields an (n+1)-dimensional array"
I'm not sure if I've _ever_ used one, but they are there.
Yes, C allows arrays of arrays, and I've used them aplenty.
However an "n-dimensional array" has one favored dimension,
out of which you can slice an array of lower dimension. For
example, you can pass a row of a 2D array to a function of a
1D variable, but you can't pass a column. That asymmetry
underlies my assertion. In Python, by contrast, n-dimensional
arrays can be sliced on any dimension.
Doug