in index.markdown, need chg bitwise C ops & and | to && and ||
The first line is the equivalent of 3 < 4 & 20 < 30 in a C-based language. The second line is the equivalent of 3 < 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 of 3 < 4 || 20 > 30.
Thank you for making EasyForth.
+1
The operators are bitwise, so it only makes sense to equate them to bitwise operators in C.
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.