is a global object that is assigned to be the text of the n input line.
- InString[n] gives the string that the Wolfram Language read for the n input line. In a text-based interface, the string includes all intermediate newlines in the input, but not the newline at the end.
- In a notebook interface, InString will typically return a string representing a typeset expression.
- 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.
Examplesopen allclose all
Basic Examples (1)
With StandardForm input, the string represents a typeset expression:
Wolfram Research (1991), InString, Wolfram Language function, https://reference.wolfram.com/language/ref/InString.html.
Wolfram Language. 1991. "InString." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/InString.html.
Wolfram Language. (1991). InString. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/InString.html