Null object: Difference between revisions
Content added Content deleted
(→Icon and Unicon: combined headers) |
m (add link to Delphi for pascal) |
||
Line 484: | Line 484: | ||
GP does not have good facilities for this, but this test suffices for most purposes: |
GP does not have good facilities for this, but this test suffices for most purposes: |
||
<lang parigp>foo!='foo</lang> |
<lang parigp>foo!='foo</lang> |
||
=={{header|Pascal}}== |
|||
See [[Undefined_values/Check_if_a_variable_is_defined#Delphi | Delphi]] |
|||
=={{header|Perl}}== |
=={{header|Perl}}== |
||
Line 499: | Line 502: | ||
<lang perl>say $number // "unknown";</lang> |
<lang perl>say $number // "unknown";</lang> |
||
prints $number if it is defined (even if it is false) or the string "unknown" otherwise. |
prints $number if it is defined (even if it is false) or the string "unknown" otherwise. |
||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |
||
{{trans|Haskell}} (as it were...) |
{{trans|Haskell}} (as it were...) |