Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Procedural Programming > CompoundExpression (;) >

CompoundExpression


evaluates the in turn, giving the last one as the result.
  • CompoundExpression evaluates its arguments in a sequence corresponding to the control flow.
  • The returned value can be the result of Return[expr].
  • returns value Null. If it is given as input, the resulting output will not be printed. Out[n] will nevertheless be assigned to be the value of .
Do a computation, but do not print its output:
is still set to be the output:
 
In[1]:=
Click for copyable input
Out[1]=
 
Do a computation, but do not print its output:
In[1]:=
Click for copyable input
is still set to be the output:
In[2]:=
Click for copyable input
Out[2]=
Use Throw, Catch to exit immediately:
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF