Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!brl-tgr!tgr!hadron!jsdy@SEISMO.ARPA From: jsdy@SEISMO.ARPA Newsgroups: net.lang.c Subject: Re: Multidimensional C arrays Message-ID: <7216@brl-tgr.ARPA> Date: Fri, 11-Jan-85 04:26:33 EST Article-I.D.: brl-tgr.7216 Posted: Fri Jan 11 04:26:33 1985 Date-Received: Sat, 12-Jan-85 07:43:37 EST Sender: news@brl-tgr.ARPA Organization: Ballistic Research Lab Lines: 19 > foo(array, rows, cols) > int array[rows][cols], rows, cols; If this does get implemented, then I think you'd have to enforce a restriction that 'rows' and 'cols' be "const" within the routine. (I'll have to go look at the Standard to see whether the concept of "const auto" occurs.) Then, computations can take place, albeit (as everyone agrees) a much more complex compiler to handle this. As dgary says, evaluation of the "sizeof" operator would have to be deferred (at least in this case) until runtime. This may upset people who have come to trust that a sizeof is a runtime constant. I will re-phrase my major concern with this. This will either produce semantics inconsistent with those for the syntactically similar constant-sized array arguments, or the latter must be changed, thus breaking many programs. Joe Yao (UUCP!seismo!hadron!jsdy / hadron!jsdy@seismo.ARPA)