------- Comment #3 from  2008-12-21 15:35 -------
The text of the message is not true if the variable being assigned to is
ALREADY a bool. I know that the syntax form 'if (a = b)' is to avoided, but to
say that, IN THIS CASE, the result is not a boolean is plainly wrong.

bool a;
bool b;
b = (a = true); // A boolean expression (a = true) is used to assign to 'b'.

As we know that (a = b) is a boolean expression, it seems wrong to say that it
is a boolean EXCEPT in an 'if' construct. We do this to no other data type.

So maybe the wording of the message can be changed to reflect what is actually
being disallowed. Something like ...
"The syntax form 'if (a = b)' is not allowed".
That takes the argument away from the datatype issue and makes it a syntax
issue instead.


Reply via email to