Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!olivea!orc!inews!pima!bhoughto From: bhoughto@pima.intel.com (Blair P. Houghton) Newsgroups: comp.lang.c Subject: Re: Is typedef char BUFFER[20] legal? Message-ID: <2425@inews.intel.com> Date: 10 Feb 91 21:29:25 GMT References: <22642@netcom.UUCP> <23128@netcom.COM> <16562@crdgw1.crd.ge.com> Sender: news@inews.intel.com Organization: Intel Corp, Chandler, AZ Lines: 30 In article <16562@crdgw1.crd.ge.com> volpe@camelback.crd.ge.com (Christopher R Volpe) writes: >In article <23128@netcom.COM>, avery@netcom.COM (Avery Colter) writes: >|>(Array names are not strictly objects, right? Like a pointer, a direct >|> reference to it yields an address value, but unlike a pointer the >|> array name's value itself cannot be changed.) Perfect. >Actually, array names do in fact refer to objects, that is, they are >unmodifiable lvalues. As long as we understand that referring to an object (in this case unambiguously) and being an object are two different things. Pointers, arrays, structs, and unions are called "derived types" by the ANSI standard[*]. They can refer to object types, but can not be used in the same ways object types can be used (and vice-versa; e.g., you can't apply the '.' or '->' operators to an int). [*] functions are also derived types, but do not refer to objects. (See sec. 3.1.2.5, Types, ANSI X3.159-1989.) --Blair "After about ten years of this, you'll be able to egrep my refs to the std and sort|cat them into a complete copy...it's the 'ten years' part that scares most people."