This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Programming / Flow Control  /
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 ].
  • The evaluation of the can be affected by Return, Throw and Goto.
  • ; ; 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 .
  • See the Mathematica book: Section 1.2.6Section A.2.7.
  • See also: Block.

    Further Examples

    Here is a compound expressions with three subexpressions.

    In[1]:=

    Out[1]=

    Let's tidy up the definitions.

    In[2]:=