Null object: Difference between revisions
Content added Content deleted
Drkameleon (talk | contribs) No edit summary |
Langurmonkey (talk | contribs) (added langur language example) |
||
Line 902: | Line 902: | ||
true |
true |
||
</pre> |
</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}}== |
=={{header|Lasso}}== |