Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!decvax!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: pointers to arrays Message-ID: <11818@haddock.ima.isc.com> Date: 21 Feb 89 19:17:48 GMT References: <19784@uflorida.cis.ufl.EDU> <1042@auspex.UUCP> <19797@uflorida.cis.ufl.EDU> <1052@auspex.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 15 In article <1052@auspex.UUCP> guy@auspex.UUCP (Guy Harris) writes: >No, just because you can get a pointer to an array doesn't mean you can put >an array on the LHS of an assignment; not all things you can apply the & >operator to are lvalues. Correction. `lvalue', as the term is used in the dpANS, does not mean `something that can appear on the LHS of an assignment'. In fact arrays *are* lvalues in ANSI C. Lvalues include two flavors of things that cannot be assigned (arrays and consts), and two flavors of things that have no address (bitfields and registers). A `register const' is neither addressible nor assignable, but it's still an lvalue. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint