Null object: Difference between revisions
Content added Content deleted
(Added EchoLisp) |
Walterpachl (talk | contribs) m (→{{header|ooRexx}}: typo) |
||
Line 852: | Line 852: | ||
=={{header|ooRexx}}== |
=={{header|ooRexx}}== |
||
ooRexx has a special singleton object |
ooRexx has a special singleton object called .nil that is used to indicate the absence of values in some situations (such as the default values returned from collection objects). |
||
<lang ooRexx> |
<lang ooRexx> |
||
if a[i] == .nil then say "Item" i "is missing" |
if a[i] == .nil then say "Item" i "is missing" |
||
Line 863: | Line 863: | ||
if \var("var") then say "Variable" var "is not assigned"</lang> |
if \var("var") then say "Variable" var "is not assigned"</lang> |
||
Output: |
Output: |
||
⚫ | |||
<pre> |
|||
⚫ | |||
Variable INPUT is not assigned |
Variable INPUT is not assigned |
||
Variable VAR is not assigned |
Variable VAR is not assigned</pre> |
||
</pre> |
|||
=={{header|Oz}}== |
=={{header|Oz}}== |