DMD 0.149 release (on bools)
BCS
BCS_member at pathlink.com
Tue Mar 7 20:31:46 PST 2006
[snips]
>>>int main()
>>>{
>>> int k = 0;
>>>
>>> if(!!k)writef("k\n");else writef("!k\n");
>>
>> LOL.... try this too.
>>
>> writefln("%s %s", !!i, !!k);
>
>ack! this is wrong!!
>
>apparently, ! returns a bool
I think this (a shorthand for compare to zero) would be a vary useful thing to
have officially in D, it would negate a lot of the arguments against pure bools
without diluting them (much).
More information about the Digitalmars-d-announce
mailing list