In

In[n]
is a global object that is assigned to have a delayed value of the n^(th) input line.

DetailsDetails

  • Typing In[n] causes the n^(th) input line to be re-evaluated.
  • In[] gives the last input line.
  • In[-k] gives the input k lines back.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Reevaluate a command without retyping it:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

See what commands have been entered in a session:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
In[6]:=
Click for copyable input
Out[6]=

Get Information for In. Note that here this will only include definitions from this example:

New in 1
New to Mathematica? Find your learning path »
Have a question? Ask support »