home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 17003 < prev    next >
Encoding:
Internet Message Format  |  1992-11-22  |  1.1 KB

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