Recursive function declarations

Larry Jones scjones at sdrc.UUCP
Fri Jul 15 08:21:03 AEST 1988


I am building a state machine program which is composed of a number of
functions.  Each function does it's thing and returns a pointer to the
next function to be called.  Each of the functions has exactly the same
type including return type and arguments.  My problem is exactly how to
declare these functions -- since the return type is identical to the
type of the function, you get an infinite recursion (foo is a function
returning a pointer to a function returning a pointer to a ...).

Anyone have any suggestions?

----
Larry Jones                         UUCP: ...!sdrc!scjones
SDRC                                AT&T: (513) 576-2070
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150
Nancy Reagan on superconductivity: "Just say mho."



More information about the Comp.lang.c mailing list