BUILT-IN MATHEMATICA SYMBOL
$HistoryLength
$HistoryLength
specifies the number of previous lines of input and output to keep in a Mathematica session.
- The default setting for $HistoryLength is Infinity.
- Values of In[n] and Out[n] corresponding to lines before those kept are explicitly cleared.
- Using smaller values of $HistoryLength can save substantial amounts of memory in a Mathematica session.
The default is to save the entire history:
| Out[1]= |  |
Change the setting to save no history:
| Out[1]= |  |
| Out[2]= |  |
This means the previous input can no longer be used directly:
| Out[3]= |  |
By assigning to a variable you can still refer to previous results:
| Out[4]= |  |
| Out[5]= |  |
New in 3