Just where has this language gone wrong?
Andrej Mitrovic
andrej.mitrovich at gmail.com
Tue Jul 24 09:58:15 PDT 2012
On 7/24/12, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
> The comma operator must go.
The comma operator needs to die a fast but painful death. I've had
this sort of bug recently:
int getInt(string op)
{
if (op, "a")
return 1;
else
if (op == "b")
return 2;
else
return 3;
}
Guess which number it always returns regardless of input.
More information about the Digitalmars-d
mailing list