Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!decvax!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: address of function Message-ID: <13685@haddock.ima.isc.com> Date: 13 Jun 89 01:34:24 GMT References: <2700@solo8.cs.vu.nl> <370@msor0.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 18 In article <370@msor0.UUCP> kt@msor0.UUCP (Keith Tizzard) writes: >... and does ANSI permit the following ? > int this[100], *that = &this; >I was under the impression that there was a symmetry between functions and >arrays. The symmetry you're looking for is there, but your example isn't analogous to Maarten's. It does work to write int this[100], (*that)[100] = &this; which is analogous to int foo(void), (*bar)(void) = &foo; This particular symmetry holds only if the explicit "&" is used. Writing "this" without the ampersand yields the same as "&this", but writing "foo" without the ampersand yields "&foo[0]", which is not the same as "&foo". (Though they will compare equal if brought to a common type.) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint