Path: utzoo!utgpu!watmath!att!dptg!rutgers!gatech!prism!wj4 From: wj4@prism.gatech.EDU (JOYE,WILLIAM A) Newsgroups: comp.lang.c Subject: pointers to functions Keywords: pointers, functions, portable Message-ID: <1679@hydra.gatech.EDU> Date: 30 Aug 89 20:59:28 GMT Organization: Georgia Institute of Technology Lines: 24 Ok, C gurus of the world... is the following code portable and why or why not? This code compiles and runs correct on gcc, Mac AUX cc, Ultrix cc, and Mac MPW c. extern void printf; main() { void (*f)() = printf; f("Hello, world\n"); /* are these two methods equivalent? */ (*f)("Hello, world again\n" ); } JOYE,WILLIAM A Georgia Institute of Technology, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!wj4 Internet: wj4@prism.gatech.edu -- JOYE,WILLIAM A Georgia Institute of Technology, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!wj4 Internet: wj4@prism.gatech.edu