When I'm trying to get last input expression in Wolfram Mathematica 5.2 using In[-1]
I get evaluated output:
In[1]:= On[In]
2 + 2
In[-1]
Out[2]= 4
During evaluation of In[1]:= In::trace: In[-1] --> In[$Line-1]. >>
During evaluation of In[1]:= In::trace: In[$Line-1] --> In[2]. >>
During evaluation of In[1]:= In::trace: In[2] --> 2+2. >>
Out[3]= 4
How can I get the input expression in unevaluated form?
You could try InString[]
In[1]:= 2 + 2
Out[1]= 4
In[2]:= InString[-1]
Out[2]= "\\(2 + 2\\)"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With