Tryster's correct, the = operator is being used two different ways. The
first way, it's used as an assignment operator, assigning the
value of an expression to the variable. The seond time it's a comparison operator, comparing the value of result (which is False
by default) to False, and because they are equal it returns True.
Maybe this is clearer:
Visual Basic:
result = (result = False)
It's much easier to see a C-style language, beause its equality
comparison operator is ==
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.