Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site allegra.UUCP Path: utzoo!linus!decvax!harpo!eagle!allegra!alan From: alan@allegra.UUCP Newsgroups: net.lang.c Subject: Re: mixing pointers and arrays Message-ID: <1737@allegra.UUCP> Date: Fri, 12-Aug-83 16:20:06 EDT Article-I.D.: allegra.1737 Posted: Fri Aug 12 16:20:06 1983 Date-Received: Sat, 13-Aug-83 03:27:17 EDT References: <961@rlgvax.UUCP>, <673@watcgl.UUCP> Organization: Bell Labs, Murray Hill Lines: 27 Someone asked for comments about the idea of being allowed to pass arrays (real arrays, not pointers) as arguments to functions. I love it! I would like to say things like main() { int array1[10], array2[10]; array1 = array2; f(&array1); /* Call f with the address of array1. */ g(array2); /* Call g with array2. */ } Arrays should behave like structures. After all, an array is just a structure whose elements are of the same type. (Or, conversely, a structure is just an array whose elements are not of the same type.) Unfortunately, I can't see this ever happening, even though it would make the language more consistent, more powerful, and more elegant. Too bad. Alan Driscoll Bell Labs, Murray Hill