Help, I need some(body!) prototyping
Larry Jones
scjones at sdrc.UUCP
Fri Sep 2 06:19:20 AEST 1988
In article <154 at tekn01.chalmers.se>, d85_kitte at 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 at sdrc.uucp
2000 Eastman Dr. BIX: ltl
Milford, OH 45150 AT&T: (513) 576-2070
"Save the Quayles" - Mark Russell
More information about the Comp.lang.c
mailing list