Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Systems Interfaces & Deployment > Mathematica Sessions > Session Customization >

$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:
Use "hf" as an alias for HoldForm:
Restore $PreRead to its default value:
Have Mathematica print the FullForm of parsed input expressions before evaluation:
Restore $PreRead to its default value:
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
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team