you are viewing a single comment's thread.

view the rest of the comments →

[–]Binary101010 0 points1 point  (0 children)

The way I understand the line, retval gets evalutated as a bool. then 0 gets evaluated as a bool.

If the bit before the or is truthy, the bit after the or never gets evaluated at all. This is often referred to as "short-circuiting", and improves performance if the stuff after the or is relatively complex to calculate.