Closed stoverc closed 2 years ago
Similarly, (and true false false)
returns true
.
We can get the expected behavior if we do:
make "true (1 = 1)
make "false (1 = 0)
Then:
? and true false
You don't say what to do with false
? (and true false false)
You don't say what to do with false
I didn't see anywhere in the documentation saying that we define true and false. @brianharvey Any opinion on if we should add true and false to the initial environment?
It doesn't say they're defined, per se, but it does say they're "special":
Clearly not a definitive thing, but it is somewhat suggestive.
On 1/30/22 5:16 PM, Joshua Cogliati wrote:
I didn't see anywhere in the documentation saying that we define true and false. @brianharvey Any opinion on if we should add true and false to the initial environment?
I don't have a strong opinion either way, but those examples would have worked if the words were quoted (like any other situation in which you want a literal word as an input): AND "TRUE "FALSE and so on.
Ahhhh, this makes sense. I apologize for my ignorance; I'm new to Logo (just got it a couple days ago to expose my son to some programming stuff) so I'm pretty unsure about a lot of things like this.
Thanks for entertaining my situation, and I'm sorry for wasting everyone's time.
Hm, maybe we should add some examples in the logical operations section of the manual with "true and "false.
That definitely wouldn't hurt. 👍
and True False
when it should returnFalse
.