DMD 0.165 release
Walter Bright
newshound at digitalmars.com
Mon Aug 21 00:48:57 PDT 2006
Tom S wrote:
> The supplied example:
>
> void foo()
> {
> int v = 2;
> cond
> (
> scase(v == 1, writefln("it is 1")),
> scase(v == 2, writefln("it is 2")),
> scase(v == 3, writefln("it is 3")),
> scase(true, writefln("it is the default"))
> );
> }
>
> Gives errors: 'voids have no value'. It works when writefln is changed
> to printf, as it returns an int... It would be cool if voids were also
> allowed to be lazy.
That's what I get for changing the code at the last minute. :-(
More information about the Digitalmars-d-announce
mailing list