Legacy Documentation

Mathematica® Teacher's Edition (2002)

This is documentation for an obsolete product.
Current products and services
 Documentation /  Mathematica Teacher's Edition /  The Teacher's Book /  Basic Calculations /  One Thing after Another /

3.3 Sequences of Operations

In doing a calculation with Mathematica TE, you usually go through a sequence of steps. If you want to, you can do each step on a separate line. Often, however, you will find it convenient to put several steps on the same line. You can do this simply by separating the pieces of input you want to give with semicolons.

Ways to do sequences of operations in Mathematica.

This does three operations on the same line. The result is the result from the last operation.

In[1]:= x = 4; y = 6; z = y + 6

Out[1]=

If you end your input with a semicolon, it is as if you are giving a sequence of operations, with an "empty" one at the end. This has the effect of making Mathematica TE perform the operations you specify, but display no output.

Inhibiting output.

Putting a semicolon at the end of the line tells Mathematica TE to produce no output.

In[2]:= x = 67 - 5 ;

You can still use % to get the output that would have been produced.

In[3]:= %

Out[3]=