This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
[an error occurred while processing this directive] $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, $PreRead is typically applied to the input so far whenever each line is terminated.
  • $PreRead is applied to all strings returned by a $SyntaxHandler function.
  • $PreRead is applied before InString[ n ] is assigned.
  • See the Mathematica book: Section 2.13.1.
  • See also: StringReplace, ToExpression.