Jump to content

Logical operations: Difference between revisions

m
imported>Tromp
(logical operations in BLC)
Line 2,244:
 
=={{header|langur}}==
The logical operators in langur compare the "truthiness" of the left and right operands and do not require Booleans. A null is a non-truthy result.
 
The operators and, or, nand, nor, and?, or?, nand?, nor?, xor?, and nxor? are short-circuiting.
Line 2,250:
Operators that end with ? are null propagating or "database" operators, and will return null if either operand is null. They short-circuit differently than normal operators (only if the left operand is null).
 
<syntaxhighlight lang="langur">val .test = ffn(.a, .b) join("\n", [
$"not \.a;: \{not .a}",
$"\.a; and \.b;: \.a and .b;",
1,007

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.