Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!agate!bionet!csd4.milw.wisc.edu!mailrus!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: dereferencing function pointers Message-ID: <9464@smoke.BRL.MIL> Date: 20 Jan 89 20:34:24 GMT References: <185@ncr-fc.FtCollins.NCR.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 19 In article <185@ncr-fc.FtCollins.NCR.COM> dona@ncr-fc.FtCollins.NCR.COM (Don Allingham) writes: >The above code operates as I would expect, an prints "hello" to the screen. >However, if ppointer is derefernced only once, as in the following example, >the program will produces the same results. Sure, because actually functions are called through pointers to them. The name of a function in the usual form of function call foo(bar); gets immediately turned into a pointer to the function then the call is made using that pointer. The extra * on ppointer in your first example of calling the function was unnecessary (but valid). If you find the above surprising, you're not alone! >%CC-W-CONFLICTDECL, This declaration of "pointer" conflicts > with a previous declaration of the same name. All I can guess is that VMS's has usurped the identifier "pointer" to mean something else. Perhaps it's a typedef for (void*).