debug()

Orion- thierry.passeron at gmail.com
Wed Feb 27 11:47:39 PST 2008


Jason House Wrote:

> Orion- wrote:
> > So, here are my 2 questions:
> > 
> >   * How do you know 'self' inside a class member function in D?
> 
> Use 'this'
> 
> 
> >   * How would you do to have __LINE__ being the line where dprintf was
> >   called not the line where it is implemented ?
> 
> I can't answer that part authoritatively, but...
> 
> Are you doing dprintf(...) instead of debug printf(...) ?  If so, I
> recommend trying out the d style.  Using debug(n), where n is an int, can
> be very useful for looking at differing levels of output.  I personally
> have mostly moved away from that and started using debug(ident) (possibly
> with debug=ident at the top of the file or adding -debug=ident to the dmd
> call).  The nice thing with that is it becomes extremely easy to leave all
> your debug stuff in your source.  When chasing down a bug later on, it can
> be helpful.

Thank Jason, could you point me to the/a debug(n) documentation?

Regards, Thierry



More information about the Digitalmars-d mailing list