Null object: Difference between revisions

added langur language example
No edit summary
(added langur language example)
Line 902:
true
</pre>
 
=={{header|Langur}}==
Null can be compared for directly, using equality operators, or can be checked with the isNull() function. Database operators (ending with ? mark) propagate null. A null in an expression test is a non-truthy result.
 
<lang Langur>var (.x, .y) = (true, null)
 
writeln .x == null
writeln .y == null
writeln .x ==? null
writeln .y ==? null
 
# null not a "truthy" result
writeln if(null: 0; 1)</lang>
 
{{out}}
<pre>false
true
null
null
1</pre>
 
=={{header|Lasso}}==
990

edits