"Nick Sabalausky" <a@a.a> wrote in message news:ilf11q$1l6l$1...@digitalmars.com... > "Simon" <s.d.hamm...@gmail.com> wrote in message > news:ile8be$4as$1...@digitalmars.com... >> On 11/03/2011 21:33, Nick Sabalausky wrote: >>> "dsimcha"<dsim...@yahoo.com> wrote in message >>> >>> Unfortunately that makes debugging CTFE a royal pain in the ass since >>> CTFE >>> has absolutely zero way to send anything to stdout - or any other IO for >>> that matter. And you can't work around it by appending to a log to then >>> display at runtime because CTFE deliberately disallows any global >>> mutable >>> state *even* when order-of-evaluation doesn't matter for what you're >>> trying >>> to do. >>> >>> >> >> huh? >> >> just use: >> >> pragma(msg, CTFE_string); >> >> piss of piss. >> > > s/piss/shit/ > > void foo(string str) > { > pragma(msg, str); > } > enum x = foo("fubared"); > > Try it. Big fail. >
Erm, I meant: int foo(string str) { pragma(msg, str); return 0; } enum x = foo("fubared");