Null object: Difference between revisions
→{{header|langur}}
LalaithMeren (talk | contribs) |
Langurmonkey (talk | contribs) |
||
Line 1,193:
Null can be compared for directly, using equality operators. Operators ending with a ? mark propagate null. A null in an expression test is a non-truthy result.
<syntaxhighlight lang="langur">
var x, y = true, null
writeln
writeln
writeln
writeln
# null not a "truthy" result
writeln if(null: 0; 1)
</syntaxhighlight>
{{out}}
|