[net.lang.c] routines which return function point

mccaugh@uiucdcs.UUCP (12/29/84)

 A function to a pointer? Since when are functions "to" anything? In "point"
 of fact, in the example you cite, not "onexit", but the function to which
 "onexit" points, takes as argument a function returning pointer to a function.
 

mccaugh@uiucdcs.UUCP (12/29/84)

More specifically, the function designated by "onexit" assumes as argument a
pointer to a function which simply has the distinction of returning as value
a pointer to a (perhaps other) function, NOT a function to a pointer.

mccaugh@uiucdcs.UUCP (12/29/84)

 In other words, Whitesmith's "onexit" takes as argument the same type
 as its return value: pointer to function which returns pointer to a
 function.

garys@bunker.UUCP (Gary M. Samuelson) (01/03/85)

> 
>  In other words, Whitesmith's "onexit" takes as argument the same type
>  as its return value: pointer to function which returns pointer to a
>  function.

In 'C', there is no such thing as a "function (period)"; it is
always a "function which returns <x>, where <x> is some known type.
Hence the difficulty of declaring a function which returns a pointer
to a function of the same type.  Try to declare a function which
returns its own address.  "A function which returns a pointer to a
function which returns a pointer ...."

Gary Samuelson
ittvax!bunker!garys

Travis Lee Winfrey <Us.Travis%CU20B@COLUMBIA.ARPA> (01/04/85)

thanks for clearing that up.  try it doing it with one message next time.

travis
-------