Null object: Difference between revisions

Content added Content deleted
No edit summary
Line 222: Line 222:
FullForm[x]
FullForm[x]
</lang>
</lang>
Both set x to be Null;
Both set x to be Null. To specifically test is something is Null one can use the SameQ:
<lang Mathematica>
However an object can also be 'empty' having nothing to it assigned (which is not equivalent to Null in Mathematica).
SameQ[x,Null]]
</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.
To test if an object has something assigned (number, list, graphics, null, infinity, symbol, equation, pattern, whatever) one uses ValueQ:
To test if an object has something assigned (number, list, graphics, null, infinity, symbol, equation, pattern, whatever) one uses ValueQ:
<lang Mathematica>
<lang Mathematica>
Line 236: Line 239:
True
True
</lang>
</lang>




=={{header|MAXScript}}==
=={{header|MAXScript}}==