multidimensional arrays in C
Doug Gwyn (VLD/VMB)
gwyn at Brl-Vld.ARPA
Mon Jan 7 03:35:04 AEST 1985
I love C and use it for almost all applications programming.
The single biggest deficiency I have found in the language
is what Mr. Grady explained: Formal array parameters are
not permitted to have parametric dimensions. That is,
void mat_mul( p, q, r, a, b, c )
int p, q, r; /* dimensions */
double a[p][q], b[q][r], c[p][r]; /* arrays */
{
is not a legal C procedure header. It is clear that a C
compiler COULD be made to handle this more general case,
and that there is no practical way to code this procedure
using the current language definition. If one wants to
displace Fortran from its dominating position in numerical
software, this problem HAS to be solved.
More information about the Comp.lang.c
mailing list