You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that the bitwise operators above (& , |) should be changed to the logical operators (&& , ||)
In Forth, and, or, xor, invert are bitwise. So it's better to illustrate them with bitwise operators in C.
In the same time, a normalized true flag in Forth is represented by a single-cell value with all bits set. So, the words < and > return -1 on true, and the result of those expressions will be -1 in Forth, and 1 in C, regardless whether logic or bitwise operators are used in C.
The first line is the equivalent of
3 < 4 & 20 < 30
in a C-based language. The second line is the equivalent of3 < 4 | 20 > 30
.I believe that the bitwise operators above (& , |) should be changed to the logical operators (&& , ||) as below.
The first line is the equivalent of
3 < 4 && 20 < 30
in a C-based language. The second line is the equivalent of3 < 4 || 20 > 30
.Thank you for making EasyForth.
The text was updated successfully, but these errors were encountered: