|
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 |
digitalmars.D.learn - macro help
hey im curious, are there any facilities in d for expanding macros beyond a mixin? for example what if i want to pass the source location into a function, for example: in c/c++ i could write a method: _someMethod( int line, string source ); then macro: #define someMethod() _someMethod( _LINE_, _FILE_ ); etc.. how would you do something like this in D ? Jul 27 2005
"J Thomas" <jtd514 ameritech.net> wrote in message news:dc7clf$26s3$1 digitaldaemon.com...hey im curious, are there any facilities in d for expanding macros beyond a mixin? for example what if i want to pass the source location into a function, for example: in c/c++ i could write a method: _someMethod( int line, string source ); then macro: #define someMethod() _someMethod( _LINE_, _FILE_ ); etc.. how would you do something like this in D ? Jul 27 2005
yah thats what i was thinking, bummer... i love D but im still not completely sold on the no preprocessor Ben Hinkle wrote:"J Thomas" <jtd514 ameritech.net> wrote in message news:dc7clf$26s3$1 digitaldaemon.com...hey im curious, are there any facilities in d for expanding macros beyond a mixin? for example what if i want to pass the source location into a function, for example: in c/c++ i could write a method: _someMethod( int line, string source ); then macro: #define someMethod() _someMethod( _LINE_, _FILE_ ); etc.. how would you do something like this in D ? Jul 27 2005
You can always run it through a C++ pre-proccessor before compilation. Charlie "J Thomas" <jtd514 ameritech.net> wrote in message news:dc8hvi$d5c$1 digitaldaemon.com...yah thats what i was thinking, bummer... i love D but im still not completely sold on the no preprocessor Ben Hinkle wrote:"J Thomas" <jtd514 ameritech.net> wrote in message news:dc7clf$26s3$1 digitaldaemon.com...hey im curious, are there any facilities in d for expanding macros Jul 27 2005
"Charles" <noone nowhere.com> wrote:You can always run it through a C++ pre-proccessor before compilation. Jul 27 2005
|