|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - function pointers
Yes, I know it's not the first time this question is asked, still... what will be the syntax for function pointers in D? Will it be like in C (please, no!), or D-style when all type attributes are on the left... or whatever? The reason why I ask is that I've started messing with WinAPI headers, trying to convert them to D, so far I have a simple converter already but I need to know syntax for function pointers to bring it to working stage... Dec 23 2001
At the moment they work like C function pointers. -Walter "Pavel Minayev" <evilone omen.ru> wrote in message news:a05amk$278o$1 digitaldaemon.com...Yes, I know it's not the first time this question is asked, still... what will be the syntax for function pointers in D? Will it be like in C (please, no!), or D-style when all type attributes are on the left... or whatever? The reason why I ask is that I've started messing with WinAPI headers, trying to convert them to D, so far I have a simple converter already but I need to know syntax for function pointers to bring it to working stage... Dec 23 2001
"Walter" <walter digitalmars.com> wrote in message news:a05cv8$28l0$1 digitaldaemon.com...At the moment they work like C function pointers. -Walter Dec 23 2001
"Pavel Minayev" <evilone omen.ru> wrote in message news:a05gga$2b5c$1 digitaldaemon.com..."Walter" <walter digitalmars.com> wrote in message news:a05cv8$28l0$1 digitaldaemon.com...At the moment they work like C function pointers. -Walter Dec 23 2001
"Walter" <walter digitalmars.com> wrote in message news:a05jv9$2cuo$2 digitaldaemon.com...At the moment they work like C function pointers. -Walter Dec 23 2001
I have to rewrite the declaration parsing code anyway, I'll revisit it then. -Walter "Pavel Minayev" <evilone omen.ru> wrote in message news:a06pcm$9bk$1 digitaldaemon.com..."Walter" <walter digitalmars.com> wrote in message news:a05jv9$2cuo$2 digitaldaemon.com...At the moment they work like C function pointers. -Walter Dec 24 2001
Also, I've noticed that there is no way to put extern() into function pointer declaration. There should be a way to do that since all API callbacks are defined as stdcall. Dec 23 2001
The usual way to accomplish that is put the extern around a typedef. "Pavel Minayev" <evilone omen.ru> wrote in message news:a05got$2b6c$1 digitaldaemon.com...Also, I've noticed that there is no way to put extern() into function pointer declaration. There should be a way to do that since all API callbacks are defined as stdcall. Dec 23 2001
"Walter" <walter digitalmars.com> wrote in message news:a05jv8$2cuo$1 digitaldaemon.com...The usual way to accomplish that is put the extern around a typedef. Dec 24 2001
"Pavel Minayev" <evilone omen.ru> wrote in message news:a06pco$9bk$2 digitaldaemon.com..."Walter" <walter digitalmars.com> wrote in message news:a05jv8$2cuo$1 digitaldaemon.com...The usual way to accomplish that is put the extern around a typedef. Dec 24 2001
|