DMD 0.165 release

Ivan Senji ivan.senji_REMOVE_ at _THIS__gmail.com
Mon Aug 21 01:04:09 PDT 2006


Walter Bright wrote:
> 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. :-(

:)

I get voids have no value for the dotimes example on line:
dotimes(10, writef(x++));




More information about the Digitalmars-d-announce mailing list