Feature request : Make Error Messages More Helpful

Julio César Carrascal jcesar at phreaker.net
Sat Apr 14 21:13:36 PDT 2007


Don Clugston wrote:
> template Fizz(int x)
> {
>     static if (x==0) const char [] Fizz = "";
>     else const char [] Fizz = Fizz!(x-1) ~ " " ~
>     ((x%3==0 && x%5==0)? "FizzBuzz" : (x%3==0) ? "Buzz" : (x%5==0) 
> ?"Fizz" : x.stringof);
> }
> 
> int a = Fizz!(100);

Very nice. I should have tried before posting. Je je.



More information about the Digitalmars-d mailing list