Translation of C function pointer.
Jonathan M Davis
jmdavisProg at gmx.com
Fri Sep 17 01:12:34 PDT 2010
On Thursday 16 September 2010 23:50:16 Kagamin wrote:
> BCS Wrote:
> > The trick is that function pointers are best read from the inside out.
>
> All C declarations are read from inside out, postfixes take precedence,
> that's why you have to use braces to give pointer higher precedence. One
> of the earlier books by Stroustroup gives a nice monster of arrays,
> pointers and functions to master understanding of declarations.
It's essentially the same principle that makes it so that the D declaration
int[4][3] a;
is an array with 3 rows and 4 columns rather than 4 rows and 3 columns like
you'd expect.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list