Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site lsuc.UUCP Path: utzoo!lsuc!msb From: msb@lsuc.UUCP (Mark Brader) Newsgroups: net.lang.c,net.lang.f77 Subject: Re: Converting FORTRAN to C Message-ID: <277@lsuc.UUCP> Date: Wed, 9-Jan-85 19:29:49 EST Article-I.D.: lsuc.277 Posted: Wed Jan 9 19:29:49 1985 Date-Received: Wed, 9-Jan-85 21:07:09 EST References: <435@ukma.UUCP> <431@ecsvax.UUCP> <531@ncoast.UUCP> Reply-To: msb@lsuc.UUCP (Mark Brader) Organization: Law Society of Upper Canada, Toronto Lines: 22 Summary: > ... that feature of C that I love to hate: ...the apparent > and real semantics of array declarations are wildly at variance with > each other. The C compiler goes to great lengths to make > > int a[5][2]; > > look like > > a ----> (a1) (a2) (a3) (a4) (a5) > | | | | | > V V V V V > (a1.1) (a2.1) (a3.1) (a4.1) (a5.1) > (a1.2) (a2.2) (a3.2) (a4.2) (a5.2) > > ...but `a' is really a constant and a1, a2, a3, a4, a5 have no objective > existence at all. This really galls me; ... Sure they do; they just don't take up any memory. They're pointer-valued constants, just as a is itself. a[2] is a constant, just as if it was declared as int (*a2)[2]; --Why shouldn't it be? Mark Brader