Boolean values: Difference between revisions

→‎E: Add EasyLang
(Add Ecstasy example)
(→‎E: Add EasyLang)
Line 898:
> if (bowlian) { "a" } else { "b" }
# value: "a"</syntaxhighlight>
 
=={{header|EasyLang}}==
EasyLang does not have built-in boolean types or constants. Operators that "return" a boolean type (e.g. >, <=) cannot be used outside of conditional statements and loops.
 
You can use 1 or 0 in place of true and false, or you can just use the strings "true" and "false".
 
<syntaxhighlight lang="easylang">
boolNumber = 1
if boolNumber = 1
print "True"
else
print "False"
.
boolString$ = "true"
if boolString$ = "true"
print "True"
else
print "False"
.
</syntaxhighlight>
 
=={{header|EchoLisp}}==
"All that which is not false is true" - Attribué à L. Wittgenstein - The only false value is the boolean #f. '''All''' other objects, including the empty list or null or 0 ..- evaluate to #t = true.
175

edits