2
$\begingroup$

Has anyone else had this problem, is it a setting, or a bug in 10.3?

In[1]:= 2;
        %+2
Out[2]= %1+2
$\endgroup$
4
  • 1
    $\begingroup$ I cannot reproduce this behavior on MMA 10.3 (Win7-64bit). Have you tried restarting the kernel, the whole MMA session, or possibly trying a clean start? $\endgroup$
    – MarcoB
    Commented Oct 25, 2015 at 17:16
  • 6
    $\begingroup$ You have likely set $HistoryLength=0. $\endgroup$
    – Szabolcs
    Commented Oct 25, 2015 at 17:18
  • $\begingroup$ Thanks to both of you, I had just quit the kernel and that solved the issue. I was using someone else's notebook and they must have had $HistoryLength=0 in an initialization cell. Problem's solved. $\endgroup$ Commented Oct 25, 2015 at 17:21
  • $\begingroup$ @EricWilliamSmith Would you mind answering your own question including @Szabolcs suggestion (it is encouraged in SE)? $HistoryLength had not occurred to me first, and I think it would be useful to have this question show up as answered for future users that might run into the same issue. $\endgroup$
    – MarcoB
    Commented Oct 25, 2015 at 17:24

1 Answer 1

4
$\begingroup$

As @Szabolcs pointed out, $HistoryLength mush have been set to 0. I was using someone else's notebook on the same kernel and it caused my % statements to not return the expression but %n instead. Restarting the kernel worked; the problem would return if I evaluated the other user's notebook.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.