red / REP

Red Enhancement Process
BSD 3-Clause "New" or "Revised" License
11 stars 4 forks source link

BUG: logical AND operator #140

Closed JEROME-TICTEC closed 1 year ago

JEROME-TICTEC commented 1 year ago

hey guy's,

not(false) and not(true) == true ??

have you already seen that ?

regards,

greggirwin commented 1 year ago

First, use the red/red repo for bug tickets. Second, raise questions in chat on gitter (now matrix) to confirm that others think it's a bug. But to answer your question, it's evaluation order that is tripping you up, because and is an (infix) op!, so evaluates first. Play in the console to see if you can figure out what's going on, and ask in red/help chat for hints. Here's what I did to confirm that it works as I expect.

>> false and true
== false
>> (not false) and (not true)
== false
>> and~ not false not true
== false