On Friday, September 17, 2010 17:07:15 Simen kjaeraas wrote:
> Jonathan M Davis 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
Jonathan M Davis 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 anyway. It just
d
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 t
On Friday, September 17, 2010 10:43:12 Ali Çehreli wrote:
> 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, pos
On Friday, September 17, 2010 05:00:55 Simen kjaeraas wrote:
> On Fri, 17 Sep 2010 10:12:34 +0200, 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 d
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 h
On Fri, 17 Sep 2010 10:12:34 +0200, 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 t
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
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 a
On 16/09/2010 15:37, Steven Schveighoffer wrote:
On Thu, 16 Sep 2010 10:06:24 -0400, 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
Hello Steven,
On Thu, 16 Sep 2010 10:06:24 -0400, 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*, c
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,
On Thu, 16 Sep 2010 10:06:24 -0400, 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
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 Wed, 15 Sep 2010 16:15:12 -0500, Steven Schveighoffer
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*/);
pragma(msg, typeof(xDlSym).str
On Wed, 15 Sep 2010 17:05:24 -0400, Yao G.
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 another function pointer
On Wed, 15 Sep 2010 17:15:12 -0400, Steven Schveighoffer
wrote:
On Wed, 15 Sep 2010 17:05:24 -0400, Yao G.
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);
17 matches
Mail list logo