Boolean values: Difference between revisions
Content added Content deleted
(add BQN) |
|||
Line 621: | Line 621: | ||
=={{header|Befunge}}== |
=={{header|Befunge}}== |
||
Zero is false, non-zero is true. This is only used by the horizontal and vertical switch operators (<code>_</code> and <code>|</code>). |
Zero is false, non-zero is true. This is only used by the horizontal and vertical switch operators (<code>_</code> and <code>|</code>). |
||
=={{header|BQN}}== |
|||
For predicates, the boolean value given must be 0 or 1. All other values error. |
|||
<pre>{1?34} |
|||
34 |
|||
{⟨⟩?34} |
|||
ERROR</pre> |
|||
For logical assertion, the test is simply whether the right argument is 1 (<code>𝕩≡1</code>). Anything other than 1 will cause an error. |
|||
<pre>!1 |
|||
1 |
|||
!⟨⟩ |
|||
ERROR |
|||
!0 |
|||
ERROR</pre> |
|||
=={{header|Bracmat}}== |
=={{header|Bracmat}}== |