DMD 0.148 release

Derek Parnell derek at psych.ward
Sat Feb 25 20:00:20 PST 2006


On Sun, 26 Feb 2006 12:54:15 +1100, Walter Bright  
<newshound at digitalmars.com> wrote:

> Lots of new stuff, I added new threads for them in the digitalmars.D
> newsgroup.
>

Well you almost got bool right <G> Everything except that it does implicit  
conversion to int. That is just a cheap cop out for lazy coding, IMNSHO.

//--------------------
import std.stdio;

void main()
{
   bool a;
   bool b;
   bool c;
   bool d;
   int e;

   a = true;
   b = true;
   c = true;
   d = a + b + c;
   e = a + b + c; // In a decent implentation, this should have failed to  
compile
   writefln("%s %s %s %s %s", a,b,c,d,e);
   writefln("%d %d %d %d %d", a,b,c,d,e); // And this might have been a  
runtime error?

}
//-------------------
-- 
Derek Parnell
Melbourne, Australia



More information about the Digitalmars-d-announce mailing list