Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!vsi1!altnet!uunet!sdrc!scjones From: scjones@sdrc.UUCP (Larry Jones) Newsgroups: comp.lang.c Subject: Re: Help, I need some(body!) prototyping Message-ID: <371@sdrc.UUCP> Date: 1 Sep 88 20:19:20 GMT References: <154@tekn01.chalmers.se> Organization: Structural Dynamics Research Corp., Cincinnati Lines: 36 In article <154@tekn01.chalmers.se>, d85_kitte@tekn01.chalmers.se (Kristian Wedberg) writes: > I need help with a prototyping-problem: > > A FileRequester() of mine uses the address of a filter-function. > The parameter is declared as > > FileRequester(...., filter, ...) > .... > LONG (*filter)(); > ... > > which is A OK. But. When I try to prototype this with > > GLOBAL LONG FileRequester(..., LONG*(), ...); > > and simmilar things I get something TYPES DON'T MATCH something. > > So, what am I doing wrong? ? ? The handy rule of thumb for writing types is: write a declaraction then erase the name of the thing being declared (and the semicolon). Thus LONG (*filter)(); becomes LONG (*)() and that's what you need in your prototype. ---- Larry Jones UUCP: uunet!sdrc!scjones SDRC scjones@sdrc.uucp 2000 Eastman Dr. BIX: ltl Milford, OH 45150 AT&T: (513) 576-2070 "Save the Quayles" - Mark Russell