Name: Anonymous 2011-05-02 13:10
I was making a program and I noticed that doing
and
behaved differently. Why is this? What's the difference between one and the other? The first one (the one that has a variable with the function return value) behaved as I thought it would, which is comparing the function return value with the constant. I don't know what the other one does. Thanks.
if ((j = function()) == 20)and
if (function() == 20)behaved differently. Why is this? What's the difference between one and the other? The first one (the one that has a variable with the function return value) behaved as I thought it would, which is comparing the function return value with the constant. I don't know what the other one does. Thanks.