On Thursday, June 29, 2023 12:27:22 PM MDT Cecil Ward via Digitalmars-d-learn
wrote:
> I’m trying to debug my D program with old-fashioned printfs stuck
> in various strategic places, actually using writefln(). My
> problem is that the addition of printf fights with the existing
> declarations
On Fri, Jun 30, 2023 at 03:43:14PM +, Cecil Ward via Digitalmars-d-learn
wrote:
[...]
> Since I can pass my main function some compile-time-defined input, the
> whole program should be capable of being executed with CTFE, no? So in
> that case pragma( msg ) should suffice for a test
On Thursday, 29 June 2023 at 23:54:45 UTC, Chris Katko wrote:
On Thursday, 29 June 2023 at 18:27:22 UTC, Cecil Ward wrote:
I’m trying to debug my D program with old-fashioned printfs
stuck in various strategic places, actually using writefln().
My problem is that the addition of printf fights
On Thursday, 29 June 2023 at 18:27:22 UTC, Cecil Ward wrote:
I’m trying to debug my D program with old-fashioned printfs
stuck in various strategic places, actually using writefln().
My problem is that the addition of printf fights with the
existing declarations for pure nothrow @nogc @safe
```d
debug {
writeln("text");
}
```
```d
writeln(__MODULE__, ":", __LINE__, " ", "stuff");
```
You'll need to wrap try/catch for flushing stdout however.
```d
debug writeln(__MODULE__, ":", __LINE__, " ", "stuff");
```
Opps missed the debug.
I’m trying to debug my D program with old-fashioned printfs stuck
in various strategic places, actually using writefln(). My
problem is that the addition of printf fights with the existing
declarations for pure nothrow @nogc @safe and I have to adjust
them, then put them back correctly when