if(bool = x) does not give a boolean result

BCS none at anon.com
Sat May 8 12:49:11 PDT 2010


Hello Steven,

> No.  I meant bool = bool.  I'm not comparing two bools, I'm assigning
> to a  bool, and then using if on the result.  At best, this is a bogus
> error  message.
> 

More often than not (or so the thinking goes), that isn't the case and the 
programmer in fact did want ==.

Also, you might check if "if((var = boolExp))" works.

-- 
... <IXOYE><





More information about the Digitalmars-d-learn mailing list