home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sdrc!thor!scjones
- From: scjones@thor.sdrc.com (Larry Jones)
- Newsgroups: comp.lang.c
- Subject: Re: pointers to functions
- Keywords: pointers functions parameters
- Message-ID: <2306@sdrc.COM>
- Date: 22 Nov 92 17:24:02 GMT
- References: <mwm.2k0j@contessa.palo-alto.ca.us> <1992Nov22.000843.191255@zeus.calpoly.edu>
- Sender: news@sdrc.COM
- Distribution: na
- Lines: 14
-
- In article <1992Nov22.000843.191255@zeus.calpoly.edu>, tcobbs@zeus.calpoly.edu (Travis Cobbs) writes:
- > [about how to call a function through a pointer]
- > Actually, you don't need to use (*pfun)(), you can just use pfun(). C
- > interprets them both the same way, since there's no other logical thing to do
- > with a function call except call the function.
-
- That's true for ANSI compilers, but some non-ANSI compilers insist on the
- first form. And many of us prefer that from a stylistic viewpoint since
- it emphasizes that pfun is pointing to the function being called rather
- than the actual name of the function.
- ----
- Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH 45150-2789 513-576-2070
- larry.jones@sdrc.com or ...uunet!sdrc!larry.jones
- Everything's gotta have rules, rules, rules! -- Calvin
-