Closed t1nfoil closed 3 years ago
Hello @80at8,
The sentence you refer to It returns the left operand if it’s false, or the right operand otherwise:
means the following:
The and
expression returns the left operand if the left operand evaluates to false
; otherwise (i.e. if the left operand evaluates to true
), the expression returns the right operand.
So the examples Bob gave are correct.
Cheers
As @cm1776 says, the examples there are correct. I could also show the example you have too, but doing the whole truth table felt like overkill to me.
Also email contact info at the bottom of page -- bob@craftinginterpreters.com seems to bounce back with this error from O365 --
bob wasn't found at craftinginterpreters.com, or the mailbox is unavailable.
Oops! My email was in a weird state. It should be in a better place now.
In http://craftinginterpreters.com/the-lox-language.html) section 3.4.3
-- The part that says it returns the left operand if it is false, or the right operand otherwise. In the example true and false it's returning false (as it should) but true is the left operand no the right one? It should be false and true; // false?
Also email contact info at the bottom of page -- bob@craftinginterpreters.com seems to bounce back with this error from O365 --
bob wasn't found at craftinginterpreters.com, or the mailbox is unavailable.