Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!harrier.ukc.ac.uk!dac From: dac@ukc.ac.uk (David Clear) Newsgroups: comp.lang.c Subject: Invoking pointers to functions (C sytle) Message-ID: <6379@harrier.ukc.ac.uk> Date: 30 Nov 90 17:20:27 GMT Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 26 Take a look at this: main() { int fred(), (*p)(); p = fred; (*p)(10); /* The right way */ p(10); /* This works too */ } int fred(x) ... The (*p)(args) invocation is the K&R standard. p(args) also works on at least 4 different Unix compilers. Q: Is p(args) legal, portable C? Q: Is p(args) preferential to (*p)(args) as it looks neater, compare: s->p(args) (*s->p)(args) Any thoughts? I've only ever used (*p)()... I only came across p() recently. Dave.