Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site rabbit.UUCP Path: utzoo!linus!security!genrad!grkermit!masscomp!clyde!ihnp4!houxm!mhuxl!eagle!allegra!alice!rabbit!ark From: ark@rabbit.UUCP Newsgroups: net.unix Subject: Re: functions returning pionters to functions Message-ID: <2277@rabbit.UUCP> Date: Wed, 14-Dec-83 10:01:54 EST Article-I.D.: rabbit.2277 Posted: Wed Dec 14 10:01:54 1983 Date-Received: Fri, 16-Dec-83 01:44:31 EST References: <2430@azure.UUCP> Organization: AT&T Bell Laboratories, Murray Hill Lines: 25 Suppose I want to write a function f that returns a pointer to a function returning an integer. I first think about how I'm going to invoke it. f(x) is going to be a pointer to a function, so *f(x) will be this function itself. Well, since * binds less tightly than function calls, I must invoke the (secondary) function by saying (*f(x))() and this expression is now an integer. If I want to write f, I therefore say: inf (*f(x))() int x; { ... } Works like a charm.