home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!prism!xray.gatech.edu!cc100aa
- From: cc100aa@xray.gatech.edu (Ray Spalding)
- Newsgroups: comp.lang.c
- Subject: Re: How to call procedure with a variable?!
- Keywords: C VARIABLE PROCEDURE
- Message-ID: <68013@hydra.gatech.EDU>
- Date: 11 Sep 92 16:15:10 GMT
- References: <1992Sep10.143705.15262@galileo.cc.rochester.edu> <67971@hydra.gatech.EDU> <1992Sep11.145441.5720@cbfsb.cb.att.com>
- Sender: news@prism.gatech.EDU
- Organization: Georgia Institute of Technology
- Lines: 17
-
- In article <1992Sep11.145441.5720@cbfsb.cb.att.com> edb1@cbnewsf.cb.att.com (edward.benyukhis) writes:
- >In article <67971@hydra.gatech.EDU> cc100aa@xray.gatech.edu (Ray Spalding) writes:
- >> t = gotoproc(1,2,3);
- >_________________________________
- >This is somewhat erroneous. The way you invoke a function is:
- > t = (*gotoproc)(1,2,3);
-
- Harbison & Steel (2nd ed. p. 273) say "In the function invocation
- f(...), the expression f may have the type "pointer to function...,"
- in which case an automatic dereference of the function pointer is
- made in order to perform the call."
-
- I believe this is OK per ANSI as well -- anyone know for sure?
- --
- Ray Spalding, Office of Information Technology
- Georgia Institute of Technology, Atlanta Georgia, 30332-0715
- Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)
-