Null object: Difference between revisions

no edit summary
m (→‎{{header|AutoHotkey}}: Minor indentation and casing edit)
No edit summary
Line 211:
print empty? [] ; true
print empty? "|| ; true
 
=={{header|Mathematica}}==
Mathematica can assign a Null value to a symbol, two examples:
<lang Mathematica>
x=Null;
</lang>
<lang Mathematica>
x =.
x = (1 + 2;)
FullForm[x]
</lang>
Both set x to be Null;
However an object can also be 'empty' having nothing to it assigned (which is not equivalent to Null in Mathematica).
To test if an object has something assigned (number, list, graphics, null, infinity, symbol, equation, pattern, whatever) one uses ValueQ:
<lang Mathematica>
x =.;
ValueQ[x]
x = 3;
ValueQ[x]
</lang>
gives:
<lang Mathematica>
False
True
</lang>
 
 
 
=={{header|MAXScript}}==
1,111

edits