D1.5 anyone?

Dennis dkorpel at gmail.com
Tue Apr 11 20:57:38 UTC 2023


On Tuesday, 11 April 2023 at 17:30:34 UTC, Hipreme wrote:
> `pure` breaks logging in your function for debugging

You can use a debug statement for that, which looks like `debug 
writeln("log");`. Or, what I do, create a 'debug print' function 
that looks like something this:
```D
void dprint(T...)(auto ref T args, int line = __LINE__, string 
file = __FILE__)
{
     debug writeln(file, "(", line, "): ", args);
}
```



More information about the Digitalmars-d mailing list