declaring routines which return function pointers

Chris Torek chris at umcp-cs.UUCP
Thu Dec 20 04:10:55 AEST 1984


Maybe someone should re-post the ``cdecl'' program:

  % cdecl
  declare f as pointer to function returning pointer to function returning int
  int (*(*f)())()
  declare x as pointer to pointer to function returning pointer to function returning pointer to pointer to pointer to function returning pointer to function returning pointer to char
  char *(*(***(*(**x)())())())()
  %

It even works the opposite direction:

  % cdecl
  explain char (**(*f())())()
  declare f as function returning pointer to function returning pointer to pointer to function returning char
  %
-- 
(This line accidently left nonblank.)

In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (301) 454-7690
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at maryland



More information about the Comp.lang.c mailing list