No subject

Uwe Hollerbach uunet!awspecs.Princeton.EDU!uh
Mon Dec 23 11:03:05 PST 1991


G'day, people,
    I have been listening to the VLA debate for a while now, and I
have a comment and question. So far, I like best the syntax

    int foo(double a[an], int n)
    {
        an = 14*n + 3; /* or whatever suits your fancy */
        ...
    }

where an is some integral type. This seems quite natural to me, and,
although I don't know very much about the details of compiler writing,
it seems that this should not be too difficult to implement, at least
from what I've read here (please feel free to correct me if this is
incorrect). My question is this: what do you do with the following:

    int LU_decompose(double a[ar][ac], int nr, int nc, int index[ar])
/*                            ^                                  ^
                              |                                  |

                              note two occurrences of ar here...
*/
    {
        /*
         * code for LU-decomposition of
         * a matrix, with partial pivoting
         */
    }

Does the first occurrence of ar declare the index_variable ar, and the
second occurrence just says "use ar here"? If this is indeed the case,
I would see this as the way to go; but if not... what then?

Uwe Hollerbach, User
Speaking from, but not for, Applied Math a Princeton




More information about the Numeric-interest mailing list