Anonymous user
Boolean values: Difference between revisions
m
→{{header|Binary Lambda Calculus}}
imported>KayproKid m (→{{header|S-BASIC}}: minor cleanup and display output) |
imported>Tromp |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 665:
=={{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>).
=={{header|Binary Lambda Calculus}}==
The standard representations for the booleans in lambda calculus are true = \then. \else. then, false = \then. \else. else, which correspond to BLC programs <code>00 00 110</code> and <code>00 00 10</code>.
=={{header|BQN}}==
Line 2,463 ⟶ 2,468:
end
</syntaxhighlight>
{{out}}
<pre>
Line 2,683 ⟶ 2,688:
This class has two methods: the operator ''!'' which returns the logical complement of its receiver and ''toString'' which returns its string representation.
<syntaxhighlight lang="
System.printAll([embed, ", ", !embed, ", ", "Is Wren embeddable? " + embed.toString])</syntaxhighlight>
Line 2,690 ⟶ 2,695:
true, false, Is Wren embeddable? true
</pre>
=={{header|XLISP}}==
Boolean "false" may be represented by <tt>#F</tt>, <tt>#!FALSE</tt>, <tt>NIL</tt>, or the empty list; any other value is counted as true in conditional expressions, but it is also possible to represent the Boolean value "true" using your choice of the symbols <tt>#T</tt>, <tt>#!TRUE</tt>, and <tt>T</tt>. All these symbols are case-insensitive. Note that <tt>T</tt>, unlike the others, is a variable: it is bound by default to the constant <tt>#T</tt>, but you can (although you shouldn't) assign it any other value including "false" (by doing something like <tt>(setq t nil)</tt>). Boolean values are printed as <tt>#T</tt> and <tt>()</tt>.
|