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
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
On Fri, 17 Sep 2010 10:12:34 +0200, Jonathan M Davis jmdavisp...@gmx.com
wrote:
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,
Jonathan M Davis wrote:
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
Jonathan M Davis Wrote:
On Friday, September 17, 2010 10:43:12 Ali Ãehreli wrote:
int[4] is an array of 4 ints; like Simen, let's call it U.
Now U[3] is an array of 3 Us; i.e. 3 int[4]s
I read that from left to right, not inside out.
No, no. You read it outwards from the variable
Jonathan M Davis jmdavisp...@gmx.com wrote:
I've always been confused by C in this regard. It seems to logical to me
that T[3] works the same whether T is U[4] or U.
You're going to have to elaborate on that. I'm not quite sure what you're
talking about. And the syntax int[4][3] isn't legal C
On Friday, September 17, 2010 17:07:15 Simen kjaeraas wrote:
Jonathan M Davis jmdavisp...@gmx.com wrote:
I've always been confused by C in this regard. It seems to logical to me
that T[3] works the same whether T is U[4] or U.
You're going to have to elaborate on that. I'm not quite sure
Hello Steven,
// note you can't use void as a parameter type in D
void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(/*void*/);
pragma(msg, typeof(xDlSym).stringof);
outputs:
void function() function(sqlite3_vfs*, void*, const const(char*)
zSymbol)
D, now with C type un-garbleing!
On Thu, 16 Sep 2010 10:06:24 -0400, BCS n...@anon.com wrote:
Hello Steven,
// note you can't use void as a parameter type in D
void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(/*void*/);
pragma(msg, typeof(xDlSym).stringof);
outputs:
void function() function(sqlite3_vfs*, void*,
On 16/09/2010 15:06, BCS wrote:
Hello Steven,
// note you can't use void as a parameter type in D
void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(/*void*/);
pragma(msg, typeof(xDlSym).stringof);
outputs:
void function() function(sqlite3_vfs*, void*, const const(char*)
zSymbol)
D,
Hello Steven,
On Thu, 16 Sep 2010 10:06:24 -0400, BCS n...@anon.com wrote:
Hello Steven,
// note you can't use void as a parameter type in D
void (*(*xDlSym)(sqlite3_vfs*,void*, const char
*zSymbol))(/*void*/);
pragma(msg, typeof(xDlSym).stringof);
outputs:
void function()
On 16/09/2010 15:37, Steven Schveighoffer wrote:
On Thu, 16 Sep 2010 10:06:24 -0400, BCS n...@anon.com wrote:
Hello Steven,
// note you can't use void as a parameter type in D
void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(/*void*/);
pragma(msg, typeof(xDlSym).stringof);
outputs:
Hello gentlemen:
I'm trying to translate the newest SQLite C header to D, and I stumbled
unto this gem:
void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
What's that? A function pointer that takes another function pointer as its
name? I'm stuck at this and I don't know how
On Wed, 15 Sep 2010 17:05:24 -0400, Yao G. yao.go...@spam.gmail.com
wrote:
Hello gentlemen:
I'm trying to translate the newest SQLite C header to D, and I stumbled
unto this gem:
void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
What's that? A function pointer that takes
On Wed, 15 Sep 2010 17:15:12 -0400, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Wed, 15 Sep 2010 17:05:24 -0400, Yao G. yao.go...@spam.gmail.com
wrote:
Hello gentlemen:
I'm trying to translate the newest SQLite C header to D, and I stumbled
unto this gem:
void
On Wed, 15 Sep 2010 16:15:12 -0500, Steven Schveighoffer
schvei...@yahoo.com wrote:
D supports C-style function pointers. See here:
typedef char sqlite3_vfs;
// note you can't use void as a parameter type in D
void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(/*void*/);
16 matches
Mail list logo