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: <7351@brl-tgr.ARPA>
Date: Tue, 15-Jan-85 13:15:13 EST
Article-I.D.: brl-tgr.7351
Posted: Tue Jan 15 13:15:13 1985
Date-Received: Fri, 18-Jan-85 03:26:18 EST
Sender: news@brl-tgr.ARPA
Organization: Ballistic Research Lab
Lines: 22

> I wish you would explain how the semantics of
> 	foo( int array[rows][cols], int rows, int cols );
> would be inconsistent with those already in effect for
> constant-sized array arguments.  I don't see this at all.

Hmmm.  If I said  t h a t , then I must be working later than I thought.
I believe I confusing two things in one message.

Passing arrays by value (entirely on the stack) is inconsistent with the
current semantics.  This is what one person had suggested.  The current
semantics is that all arrays are passed by reference (pointer).

Passing a pointer to an array, after passing one or more of its
dimensions, seems to me to be consistent, but needs a lot more work on
the part of the compiler.  Which is fine with me, but I don't have time
to do it this week (month, ...).  Anybody?  Remember that this means the
dimensions must be either squirreled away or declared 'const'.  Also,
there are lots of chances now for people to break programs by changing
array sizes one place but not another ... but that's nothing gnew, I
guess.  We're not going to check array sizes, here.

Joe Yao		(UUCP!seismo!hadron!jsdy / hadron!jsdy@seismo.ARPA)