By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,905 Members | 1,271 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,905 IT Pros & Developers. It's quick & easy.

Aout this function

P: n/a
I have seen one function implementationin C library like this:
void(*
signal(int sig, void(*func)(int)))(int)
{
/*implementation*/
}

I don't konw the meaning of this style of function implementation?
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 7 Jul 2003 01:16:36 -0700, yu********@honeywell.com (Tyler) wrote:
I have seen one function implementationin C library like this:
void(*
signal(int sig, void(*func)(int)))(int)
{
/*implementation*/
}

I don't konw the meaning of this style of function implementation?


http://www.cs.umu.se/~isak/Snippets/rtlftrul.txt

Usually an application of the right left rule is worthwhile. The
above is a reference to it.

In this case, signal is a function whose first parameter is of type
int and whose second parameter is of type pointer to function that
takes an int and returns void. signal returns a pointer to function
that takes an int and returns a void.

Best wishes,

Bob
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.