On Wednesday, 2 October 2013 at 17:06:40 UTC, Dicebot wrote:
On Wednesday, 2 October 2013 at 16:12:58 UTC, Jesse Phillips wrote:
   if (word.length)
       scope(exit) FormatOutput();

This is the same as

   if (word.length)
       FormatOutput();

The `if` introduces a new scope, thus running the code right away.

Oops, shame on me. Too many `static if`s in my life :(

I think it might be a common mistake? I remember making a similar error by placing a scope(exit) in a for loop, hoping they'd all get run when leaving the function.

Reply via email to