This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

$PreRead

$PreRead
is a global variable whose value, if set, is applied to the text or box form of every input expression before it is fed to Mathematica.
  • $PreRead is always applied to each complete input string that will be fed to Mathematica.
  • In multiline input with a text-based interface, whenever each line is terminated, $PreRead is typically applied to the input so far.
By default, $PreRead is not defined, meaning input strings are sent directly to evaluation:
In[1]:=
Click for copyable input
Out[1]=
 
Use "hf" as an alias for HoldForm:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]//FullForm=
Restore $PreRead to its default value:
In[4]:=
Click for copyable input
 
Have Mathematica print the FullForm of parsed input expressions before evaluation:
In[1]:=
Click for copyable input
Restore $PreRead to its default value:
New in 2