Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: comp.lang.c Subject: Re: Address of Array Message-ID: <2020@ttrdc.UUCP> Date: Mon, 7-Dec-87 21:51:38 EST Article-I.D.: ttrdc.2020 Posted: Mon Dec 7 21:51:38 1987 Date-Received: Sun, 13-Dec-87 08:47:14 EST References: <126@citcom.UUCP> <2550034@hpisod2.HP.COM> <1854@haddock.ISC.COM> <532@ndsuvax.UUCP> Organization: AT&T, Skokie, IL Lines: 33 In article <532@ndsuvax.UUCP>, ncbauers@ndsuvax.UUCP (Michael Bauers) writes: >In article <1854@haddock.ISC.COM> karl@haddock.ima.isc.com (Karl Heuer) writes: >>In article <2550034@hpisod2.HP.COM> decot@hpisod2.HP.COM (Dave Decot) writes: >>>I propose the syntax "a[]" to refer to an lvalue which is the entire array a, >>Okay so far. >>>and "&(a[])" to signify the address of the entire array a. >>Unnecessary, since ANSI has blessed the simpler syntax "&a". > > 1) I hate to sound picky but isn't &(a[]) the address of the array's [first element?] -- drl > When you say address of the entire array it sounds like you mean > the address of the first element in the array. The convention as I > understand it is to talk about it as you would in machine language. > So isn't the original System V C complier standard also to refer > to the address of the array's address &a. (PLEASE guys, be easy on this fellow. Keep your fangs to yourself. Down boy! DOWWNN BOY!! [Grrrrrrrrr...]) In C, the usage of an "address" connotes more than mere location; the type of the address also connotes the size of the object being addressed. This size comes into play when the address is incremented or decremented by an integral value, or when the difference is taken between it and another address of the same type. The increment or decrement is taken to be in units of the type of object pointed to by the address. Likewise, the difference is taken to be in units of the type of object pointed to. The type of object addressed may of course be a aggregate data type such as an array or struct just as well as it could be a simple data type like int or char. -- |------------Dan Levy------------| Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, | an Engihacker @ |}!ttrdc!ttrda!levy | AT&T Computer Systems Division | Disclaimer? Huh? What disclaimer??? |--------Skokie, Illinois--------|