Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Mathematica Sessions  /
InString

  • InString[ n ] is a global object that is assigned to be the text of the n input line.
  • InString[ n ] gives the string that Mathematica read for the n input line. The string includes all intermediate newlines in the input, but not the newline at the end.
  • The value of InString[ n ] is assigned after the input is verified to be syntactically correct, and after any function given as the value of $PreRead has been applied.
  • InString[ ] gives the text of the last input line.
  • InString[-k] gives the text of the input k lines back.
  • See the Mathematica book: Section 1.3.3Section 2.13.1.
  • See also: In, $SyntaxHandler.

    Further Examples

    InString lets you to recover old input.

    In[1]:=

    Out[1]=

    InString lets you to recover old input.

    In[2]:=

    Out[2]=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.