Boolean values: Difference between revisions

PascalABC.NET
imported>KayproKid
m (→‎{{header|S-BASIC}}: minor cleanup and display output)
(PascalABC.NET)
 
(4 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,023 ⟶ 2,028:
 
''See also [[#Delphi|Delphi]], [[#Free Pascal|Free Pascal]], and [[#Object Pascal|Object Pascal]]''
 
=={{header|PascalABC.NET}}==
''See [[#Pascal|Pascal]]
 
=={{header|Perl}}==
 
Line 2,463 ⟶ 2,472:
end
</syntaxhighlight>
</systaxhighlight>
{{out}}
<pre>
Line 2,683 ⟶ 2,692:
 
This class has two methods: the operator ''!'' which returns the logical complement of its receiver and ''toString'' which returns its string representation.
<syntaxhighlight lang="ecmascriptwren">var embed = true
System.printAll([embed, ", ", !embed, ", ", "Is Wren embeddable? " + embed.toString])</syntaxhighlight>
 
Line 2,690 ⟶ 2,699:
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>.
222

edits