Logical operations: Difference between revisions
m
→{{header|langur}}
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) |
||
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 = fn(.a, .b)
join("\n", [
$"not \.a;: \{not .a}",▼
$"not \.a;
$"\.a;
$"\.a; nand \.b;: \.a nand .b;",
$"\.a;
$"\.a;
$"\.a;
"",
$"
$"\.a;
$"\.a; nand? \.b;: \.a nand? .b;",
$"\.a;
$"\.a;
$"\.a;
$"\
"\n",
])
}
val .tests = [
|