Null object: Difference between revisions
Content added Content deleted
(BASIC | Applesoft BASIC) |
|||
Line 187: | Line 187: | ||
} |
} |
||
</lang> |
</lang> |
||
---- |
|||
=={{header|C++11}}== |
|||
in C++11 there is nullptr of type nullptr_t this represents a pointer to an invalid place, you can use it to test like so |
|||
<lang cpp> |
|||
int *p = nullptr; |
|||
... |
|||
if(p == nullptr){ |
|||
// do some thing |
|||
} |
|||
</lang> |
|||
=={{header|C sharp|C#}}== |
=={{header|C sharp|C#}}== |
||
As with Java, any reference type may be null, and testing for nullity uses ordinary boolean operators. |
As with Java, any reference type may be null, and testing for nullity uses ordinary boolean operators. |