July 10, 2003
Exactly. That is what I want.

See post of 22nd May for a good example of why this is desirable

"Antti Sykäri" <jsykari@gamma.hut.fi> wrote in message news:slrnbgp9gq.q7q.jsykari@seth.hut.fi...
> In article <bdie99$139m$2@digitaldaemon.com>, Walter wrote:
> >
> > "Matthew Wilson" <matthew@stlsoft.org> wrote in message news:bb38fa$1g7q$1@digitaldaemon.com...
> >> Sorry, I don't grok your answer.
> >>
> >> Surely D works with windows callbacks? All I'm saying is to allow them inside D functions.
> >
> > D does work with windows callbacks. But the callbacks need to be module level functions, not nested functions. Windows does not support D nested functions.
>
> How about static nested functions, then?
>
> AFAIK, they're just ordinary functions, only defined in a function scope, and could as well be called by Windows.
>
> -Antti
>


July 10, 2003
That might be ok.

How's this:  If a nested function is declared with a D calling convention, it has access to the containing function stack frame, otherwise it doesn't.

That way you could declare Windows callbacks locally, although they don't have the same benefits as making other D functions nested, it could be convenient and it avoids polluting the module namespace.

Sean

"Antti Sykäri" <jsykari@gamma.hut.fi> wrote in message news:slrnbgp9gq.q7q.jsykari@seth.hut.fi...
> In article <bdie99$139m$2@digitaldaemon.com>, Walter wrote:
> >
> > "Matthew Wilson" <matthew@stlsoft.org> wrote in message news:bb38fa$1g7q$1@digitaldaemon.com...
> >> Sorry, I don't grok your answer.
> >>
> >> Surely D works with windows callbacks? All I'm saying is to allow them inside D functions.
> >
> > D does work with windows callbacks. But the callbacks need to be module level functions, not nested functions. Windows does not support D nested functions.
>
> How about static nested functions, then?
>
> AFAIK, they're just ordinary functions, only defined in a function scope, and could as well be called by Windows.
>
> -Antti


July 10, 2003
Exactly what I want, and perfectly expressed.

Thanks Sean

:)

"Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:bek51e$28m7$1@digitaldaemon.com...
> That might be ok.
>
> How's this:  If a nested function is declared with a D calling convention, it has access to the containing function stack frame, otherwise it
doesn't.
>
> That way you could declare Windows callbacks locally, although they don't have the same benefits as making other D functions nested, it could be convenient and it avoids polluting the module namespace.
>
> Sean
>
> "Antti Sykäri" <jsykari@gamma.hut.fi> wrote in message news:slrnbgp9gq.q7q.jsykari@seth.hut.fi...
> > In article <bdie99$139m$2@digitaldaemon.com>, Walter wrote:
> > >
> > > "Matthew Wilson" <matthew@stlsoft.org> wrote in message news:bb38fa$1g7q$1@digitaldaemon.com...
> > >> Sorry, I don't grok your answer.
> > >>
> > >> Surely D works with windows callbacks? All I'm saying is to allow
them
> > >> inside D functions.
> > >
> > > D does work with windows callbacks. But the callbacks need to be
module
> > > level functions, not nested functions. Windows does not support D
nested
> > > functions.
> >
> > How about static nested functions, then?
> >
> > AFAIK, they're just ordinary functions, only defined in a function
scope,
> > and could as well be called by Windows.
> >
> > -Antti
>
>


1 2 3
Next ›   Last »