Undefined values: Difference between revisions
Content added Content deleted
m (add link to Delphi for pascal) |
|||
Line 500: | Line 500: | ||
In PARI, you can do the same but the function <code>is_entry()</code> is more appropriate: |
In PARI, you can do the same but the function <code>is_entry()</code> is more appropriate: |
||
<lang C>is_entry("v") == NULL;</lang> |
<lang C>is_entry("v") == NULL;</lang> |
||
=={{header|Pascal}}== |
|||
See [[Undefined_values#Delphi | Delphi]] |
|||
=={{header|Perl}}== |
=={{header|Perl}}== |
||
Line 544: | Line 547: | ||
Done |
Done |
||
</pre> |
</pre> |
||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |
||
Perl 6 has "interesting" values of undef, but unlike Perl 5, doesn't actually have a value named <tt>undef</tt>. Instead, several very different meanings of undefinedness are distinguished. First, <tt>Nil</tt> represents the absence of a value. The absence of a value cannot be stored. Instead, an attempt to assign <tt>Nil</tt> to a storage location causes that location to revert to its uninitialized state, however that is defined. |
Perl 6 has "interesting" values of undef, but unlike Perl 5, doesn't actually have a value named <tt>undef</tt>. Instead, several very different meanings of undefinedness are distinguished. First, <tt>Nil</tt> represents the absence of a value. The absence of a value cannot be stored. Instead, an attempt to assign <tt>Nil</tt> to a storage location causes that location to revert to its uninitialized state, however that is defined. |