Null object: Difference between revisions
Content added Content deleted
Line 222: | Line 222: | ||
FullForm[x] |
FullForm[x] |
||
</lang> |
</lang> |
||
Both set x to be Null. To specifically test is something is Null one can use the SameQ: |
Both set x to be Null. To specifically test is something is Null one can use the SameQ function (with infix operator: ===): |
||
<lang Mathematica> |
<lang Mathematica> |
||
SameQ[x,Null] |
SameQ[x,Null] |
||
Or equivalent: |
|||
x===Null |
|||
</lang> |
</lang> |
||
will give back True if and only if x is assigned to be Null. If x is empty (nothing assigned) this will return False. |
will give back True if and only if x is assigned to be Null. If x is empty (nothing assigned) this will return False. |