posted 18 years ago
Normally an if statement would not compile if you replace == with =. However in this case it compiles, because b is boolean. An assignment (=) has the side effect of returning the value assigned, which means for example
Here the last statement assign y = 1, and then assigns x = 1. Because (y = 1) not only assigns y = 1; it also evaluates to 1. So
is the same as
Similarly,
is the same as
[ November 27, 2005: Message edited by: Jim Yingst ]
"I'm not back." - Bill Harding, Twister