Date: Wed, 30 Jul 1997 09:06:34 -0400 (EDT) From: "Art S. Kagel" To: Ohad Somjen Cc: djgpp AT delorie DOT com Subject: Re: ... In-Reply-To: <33e1c2cf.7983444@news.netvision.net.il> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sat, 26 Jul 1997, Ohad Somjen wrote: > On Mon, 21 Jul 1997 21:21:24 GMT, NoHero69 AT aol DOT com wrote: > > >One quick question. If I have a pointer that points a function, what is the > >syntax of calling the procedure via the pointer? Is it a simple CALL > > in ASM, and is there a way to do it outside the bounds of ASM? > > if you define the following: > void (*f_ptr)(char*); //pointer to function that returns > //void and gets char* > then in order to use it: > f_ptr=&some_char_function; ^ The ampersand (&) here is not required in ANSI C or C++. It is supported for backward compatibility to K&R C code. JMTC > (*f_ptr)("bla bla bla); > > Art S. Kagel, kagel AT bloomberg DOT com