and True False returns True
stoverc opened this issue · 8 comments
stoverc commented
stoverc commented
Similarly, (and true false false)
returns true
.
jrincayc commented
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
jrincayc commented
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?
stoverc commented
brianharvey commented
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.
stoverc commented
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.
jrincayc commented
Hm, maybe we should add some examples in the logical operations section of the manual with "true and "false.
stoverc commented
That definitely wouldn't hurt. 👍