Null object: Difference between revisions
→{{header|OCaml}}
(Nimrod -> Nim) |
|||
Line 758:
| None -> "unbound value"
| Some _ -> "bounded value"</lang>
=={{header|Oforth}}==
null is an object, the only instance of Null class.
When an object is created, all attributes are initiallized to null value.
When a method or function is called, all local variables begin with null value.
<lang Oforth>null isNull
"abcd" isNull
func: testNull { | a | a ifNull: [ "Variable value is null" println ] }</lang>
=={{header|ooRexx}}==
|