call traceback is indecipherable garbage

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Feb 4 23:07:34 UTC 2022


On Fri, Feb 04, 2022 at 10:50:12PM +0000, forkit via Digitalmars-d wrote:
[...]
> btw. how do I do that exactly (ie. !debug)

	version(debug) {} else {
		... // non-debug stuff goes here
	}

If you don't like that, e.g. if you have to do this many times in your
code, you could do something like this:

	// Do this once
	version(debug) enum isDebug = true;
	else enum isDebug = false;

	...

	// Do this whenever you need
	static if (!isDebug) {
		... // non-debug stuff here
	}


T

-- 
Guns don't kill people. Bullets do.


More information about the Digitalmars-d mailing list