Null object: Difference between revisions

(→‎{{header|Chapel}}: show nil test)
Line 516:
<lang Mathematica>False
True</lang>
 
=={{header|MATLAB}} / {{header|Octave}}==
The closest think to a NULL element in Matlab/Octave is an empty field or empty string; empty fields in a conditional expression evaluate to false.
<lang MATLAB>a = []; b='';
isempty(a)
isempty(b)
if (a)
1,
else,
0
end;</lang>
 
<pre>octave:4> a = []; b='';
octave:5> isempty(a)
ans = 1
octave:6> isempty(b)
ans = 1
octave:7> if (a) 1, else, 0, end;
ans = 0</pre>
 
 
=={{header|Maxima}}==
Anonymous user