debug()

BCS ao at pathlink.com
Tue Feb 26 16:17:54 PST 2008


Reply to Orion-,

> * How would you do to have __LINE__ being the line where dprintf was
> called not the line where it is implemented ?

some runtime reflection that looks at the return pointer of the stack frame 
would do it, but Ouch. The best solution I know of passes __FILE__ and __LINE__ 
as args but to make that nice you then need to run the whole file through 
a preprocessor of some fort to auto insert them.

In short, you can't do it without a lot of work.





More information about the Digitalmars-d mailing list