Plot2kill 0.2

David Nadlinger see at klickverbot.at
Fri Mar 11 14:52:00 PST 2011


On 3/11/11 11:36 PM, Simon wrote:
> On 11/03/2011 21:33, Nick Sabalausky wrote:
>> Unfortunately that makes debugging CTFE a royal pain in the ass since
>> CTFE
>> has absolutely zero way to send anything to stdout - […]
> […]
> just use:
>
> pragma(msg, CTFE_string);

No, this doesn't quite cut it for debugging CTFE functions: While you 
can obviously use pragma(msg, …) to write the *result* of a function 
invoked via CTFE to standard output, this doesn't help you if you want 
to debug the stuff going on *in* that function itself, for example to 
track down one of the numerous CTFE bugs.

David


P.S.: As a last resort to get something printed during CTFE evaluation, 
it is possible to use »assert(false, message)« – DMD prints the 
(correctly evaluated) message as part of the compiler error message. 
Obviously, this screws up compilation though.


More information about the Digitalmars-d-announce mailing list