Path: utzoo!attcan!uunet!husc6!rice!bcm!uhnix2!uhnix1!sugar!ficc!peter From: peter@ficc.UUCP (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: anonymous functions Summary: The syntax is wedged. Message-ID: <798@.UUCP> Date: 19 May 88 14:23:11 GMT References: <5773@sigi.Colorado.EDU> <11325@mimsy.UUCP> <282@teletron.UUCP> <862@xyzzy.UUCP> Organization: SCADA Lines: 23 In article <862@xyzzy.UUCP>, throopw@xyzzy.UUCP writes: > signal( SIGINT, void (int sig){ interrupted = 1; } ); > qsort( (void *)tbl, n_elt, n_elt*sizeof(tbl_elt_t), > int (void *a, void *b){ > return( strcmp( (tbl_elt_t *)a->name, > (tbl_elt_t *)b->name ) ); } ); > /* crummy hash function, but good enough for whatever purpose: */ > hfind( name, table, int (char *s){ return(*s); } ); I think that the syntax is a bit wedged here. What you're actually doing is akin to typecasting: (void (*)(int sig)){ interrupted = 1; } (int (*)(void *a, void *b)) { ... } (int (*)(char *s)){ return s; } A bit more verbose, but should require less patching of the language definition. -- -- Peter da Silva, Ferranti International Controls Corporation. -- Phone: 713-274-5180. Remote UUCP: uunet!nuchat!sugar!peter.