Null object: Difference between revisions

m (→‎{{header|REXX}}: corrected a typo. -- ~~~~)
Line 526:
| None -> "unbound value"
| Some _ -> "bounded value"</lang>
 
=={{header|ooRexx}}==
ooRexx has a special singleton object call .nil that is used to indicate the absence of values in some situations (such as the default values returned from collection objects).
<lang ooRexx>
if a[i] == .nil then say "Item" i "is missing"
</lang>
Uninitialized ooRexx variables do not evaluate to .nil, but rather the character string name of the variable (all upperclass). The var() built-in function allows variable validity to be tested:
<lang ooRexx>
if \var("INPUT") then say "Variable INPUT is not assigned".
</lang>
 
 
=={{header|Oz}}==