anyone knows how to print __FUNCTION__ in D? and __LINE__
BCS
BCS at pathlink.com
Mon Aug 14 09:12:51 PDT 2006
davidl wrote:
>
> in c we can print __FUNCTION__ __LINE__ to indicate where we are. in D
> how to do, couldn't find.....
I use:
__FILE__":"~itoa!(__LINE__)
writef(...) // at run time
pragma(msg, ...)// at compile time
Not quite as useful but close.
BTW it requiters the itoa template that can be found about half way down
this page:
http://www.digitalmars.com/d/templates-revisited.html
More information about the Digitalmars-d-learn
mailing list