http://cdecl.org/
Cool, but it doesn't handle the last example: void (*signal(int, void (*fp)(int)))(int) ...claims there's a syntax error, and there might be, but I don't know off-hand.
The "Clockwise/Spiral Rule" in C
11–20 of 49 posts
Re: The "Clockwise/Spiral Rule" in C
#12http://cdecl.org/
Re: The "Clockwise/Spiral Rule" in C
#13http://cdecl.org/
Re: The "Clockwise/Spiral Rule" in C
#14http://cdecl.org/
It says "C gibberish ↔ English", but does it really support English to C?
Re: The "Clockwise/Spiral Rule" in C
#15The "spiral rule" makes for pretty pictures, but unfortunately it isn't correct. One simple example: int *foo[3][4]; The spiral rule would have us read this as "foo is an array [3] of pointers to array [4] of int". What it actually is is "foo is an array [3] of arrays [4] of pointers to int". The correct rule* for parsing declarations is "Start from the thing being declared, and read right until you hit a closing par…
Re: The "Clockwise/Spiral Rule" in C
#16Re: The "Clockwise/Spiral Rule" in C
#17The "spiral rule" makes for pretty pictures, but unfortunately it isn't correct. One simple example: int *foo[3][4]; The spiral rule would have us read this as "foo is an array [3] of pointers to array [4] of int". What it actually is is "foo is an array [3] of arrays [4] of pointers to int". The correct rule* for parsing declarations is "Start from the thing being declared, and read right until you hit a closing par…
I think it works if you treat all the [] as a single token. foo is a 3x4 two dimensional array of pointers to int.
Re: The "Clockwise/Spiral Rule" in C
#18The "spiral rule" makes for pretty pictures, but unfortunately it isn't correct. One simple example: int *foo[3][4]; The spiral rule would have us read this as "foo is an array [3] of pointers to array [4] of int". What it actually is is "foo is an array [3] of arrays [4] of pointers to int". The correct rule* for parsing declarations is "Start from the thing being declared, and read right until you hit a closing par…
I think it works if you treat all the [] as a single token. foo is a 3x4 two dimensional array of pointers to int.
Re: The "Clockwise/Spiral Rule" in C
#19Re: The "Clockwise/Spiral Rule" in C
#20http://cdecl.org/