Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!wjh12!talcott!harvard!seismo!brl-tgr!ron From: ron@brl-tgr.ARPA (Ron Natalie) Newsgroups: net.lang.c Subject: Re: Function Calls Message-ID: <6617@brl-tgr.ARPA> Date: Mon, 17-Dec-84 11:28:16 EST Article-I.D.: brl-tgr.6617 Posted: Mon Dec 17 11:28:16 1984 Date-Received: Tue, 18-Dec-84 07:06:49 EST References: <212@harvard.ARPA> Distribution: net Organization: Ballistic Research Lab Lines: 19 > extern int (*a)(); > extern int b(); > main() > { > a = b; /* b's type promoted to pointer to function ... */ > > (*a)(); /* a legal function call */ > b(); /* also legal */ > a(); /* not legal, but often accepted */ Lattice C has this sickness, I believe. > > (b)(); /* the question: which of these is correct? */ > (*b)(); > } > Well (b)() is correct if b() is correct, why should parentheses hurt you. "(*b)()" is illegal because (*b) is not a function. -Ron