home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!portal!cup.portal.com!Aurelius
- From: Aurelius@cup.portal.com (Mark Christian Barnes)
- Newsgroups: comp.os.vms
- Subject: Re: functions as arguments in DEC C
- Message-ID: <74480@cup.portal.com>
- Date: Wed, 27 Jan 93 22:17:29 PST
- Organization: The Portal System (TM)
- Distribution: world
- References: <1993Jan23.211019.6955@dxcern.cern.ch>
- Lines: 21
-
- |Burkhard Burow writes:
- |
- |void q ( int (*c)() ); /* A. prototype of q*/
- |void __q( void ( *a)() ) /* B. function with a function as argument*/
- |{
- | q( a ); /* C. pass the function parameter on to q.*/
- |}
-
- It would help if you at least made your arguments and prototypes
- consistant with each other:
-
- typedef void * (*UnknownFunc)( /* argmuments obey K&R promotion */ );
-
- void q( UnknownFunc ); /* prototype of q using new type */
-
- void __q( UnknownFunc a ) /* function accepting new type */
- {
- q( a ); /* pass argument to q */
- }
-
- Regards, Aurelius@cup.portal.com
-