Aout this function

T

Tyler

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?
 
R

Robert W Hand

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top