Boolean values: Difference between revisions
Content added Content deleted
(link to Logical operations) |
(Forth) |
||
Line 48: | Line 48: | ||
> if (bowlian) { "a" } else { "b" } |
> if (bowlian) { "a" } else { "b" } |
||
# value: "a"</lang> |
# value: "a"</lang> |
||
=={{lang|Forth}}== |
|||
In conditionals, zero is false, non-zero is true. There are predefined constants for the canonical forms (all bits set/clear). |
|||
<lang forth> |
|||
TRUE . \ -1 |
|||
FALSE . \ 0 |
|||
</lang> |
|||
=={{header|Haskell}}== |
=={{header|Haskell}}== |