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 / Mathematica Sessions  /
In

  • In[ n ] is a global object that is assigned to have a delayed value of the n input line.
  • Typing In[ n ] causes the n input line to be re-evaluated.
  • In[ ] gives the last input line.
  • In[-k] gives the input k lines back.
  • See the Mathematica book: Section 1.2.1, Section 1.3.3, Section 1.3.3Section 2.13.1.
  • See also: InString, Out, $Line, $HistoryLength.

    Further Examples

    Here is a small computation.

    In[1]:=

    Out[1]=

    Either one of these gives the value of the previous line of input.

    In[2]:=

    Out[2]=