Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!emory!gatech!usenet.ins.cwru.edu!abvax!iccgcc!browns From: browns@iccgcc.decnet.ab.com (Stan Brown) Newsgroups: comp.lang.c Subject: Re: Returning a pointer to a function Message-ID: <4032.27f30e01@iccgcc.decnet.ab.com> Date: 29 Mar 91 14:50:57 GMT References: <1991Mar25.094620.70@skyler.mavd.honeywell.com> <1991Mar25.205433.9958@swsrv1.uucp> Lines: 23 In article <1991Mar25.205433.9958@swsrv1.uucp>, ta@swsrv1.uucp (Tom Armistead) writes: > In article <1991Mar25.094620.70@skyler.mavd.honeywell.com> magnuson@skyler.mavd.honeywell.com (Randy Magnuson - Honeywell Inc.) writes: >>I am writing an application that needs a function that returns a pointer to a >>function (which returns an int). Can anyone send me an example of how to >>declare such a function? > > There is a program called cdecl in the Unix archives that you need to get. It > will take an english description of what you want and give you a C declaration > or vice-versa. > > Ex. > cdecl> declare func as function returning pointer to function returning int > cdecl> int (*func())() > > Where the 1st line is what you type in and the second is cdecl's response... > > The stuff is in Volume14: cdecl2.1.Z and cdecl2.2.Z Anything for those of us with no Unix access? (MS-DOS and VAX/VMS) My opinions are mine: I don't speak for any other person or company. email (until 91/4/30): browns@iccgcc.decnet.ab.com Stan Brown, Oak Road Systems, Cleveland, Ohio, USA +1 216 371 0043