Compelled to use the variable length array feature for my auxiliary function that prints square matrices, I defined it as follows:
void print_matrix(M, dim)
unsigned dim;
int M[dim][dim];
{
/* Print the matrix here. */
...
The good news is, the code works and has its parameters in the order I'd like them to be.
The bad news is, I had to use the "old-style" function declaration syntax in order to reference the yet-to-be-declared argument dim
in the declaration of M
, which is apparently considered obsolete and dangerous.
Is there a straightforward way to do the same with the "new-style" function declarations WITHOUT changing the order of the parameters? (And if not, is it considered acceptable use of the old-style syntax in this particular situation?)