Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!amdahl!nsc!csi!epimass!jbuck From: jbuck@epimass.UUCP Newsgroups: comp.lang.c Subject: Re: help with declaration Message-ID: <1272@epimass.EPI.COM> Date: Thu, 18-Jun-87 00:11:47 EDT Article-I.D.: epimass.1272 Posted: Thu Jun 18 00:11:47 1987 Date-Received: Sat, 20-Jun-87 00:46:12 EDT References: <8286@ut-sally.UUCP> Reply-To: jbuck@epimass.EPI.COM (Joe Buck) Organization: Entropic Processing, Inc., Cupertino, CA Lines: 21 Keywords: function pointer Summary: The program "cdecl" is great for this. In article <8286@ut-sally.UUCP> atc@ut-sally.UUCP (Alvin T. Campbell III) writes: > > I have a question for all you C wizards out there. I want to write >a function which returns a pointer to another function. I checked Kernighan >& Ritchie and Harbison & Steele, but found no solution. Script started on Wed Jun 17 21:08:03 1987 % cdecl declare foo as function returning pointer to function returning int int (*foo())() % exit script done on Wed Jun 17 21:08:49 1987 I typed the line beginning "declare", and cdecl shows me the declaration. I believe this program is in the comp.sources.unix (formerly mod.sources) archives, available for anonymous FTP and such. -- - Joe Buck jbuck@epimass.EPI.COM {seismo,ucbvax,sun,decwrl,}!epimass.epi.com!jbuck Old arpa mailers: jbuck%epimass.EPI.COM@seismo.css.gov