C
Chris Uppal
Stefan said:It is regrettable that courses often show »&&« only in the
context of »if«, so that beginners are lead to assume that
»&&« can only occur in this context.
Arguably teachers should also go out of their way to show comparison operators
like == and < outside the condition part of "if" and "while" statements.
I've seen code like:
if (a < b)
doSomething(true);
else
doSomething(false);
which (IMO) clearly indicates a flawed understanding.
-- chris