InputForm[expr]
prints as a version ofexpr suitable for input to the Wolfram Language.


InputForm
InputForm[expr]
prints as a version ofexpr suitable for input to the Wolfram Language.
Details and Options

- InputForm always produces one-dimensional output, suitable to be typed as lines of Wolfram Language input.
- The typeset form ofInputForm[expr] is interpreted the same asexpr when used in input.»
- When an input evaluates toInputForm[expr],InputForm does not appear in the output.»
- Put (>>) producesInputForm by default.
- Short[InputForm[expr]] can be used, but may generate skeleton objects that cannot be given as Wolfram Language input.
- The optionNumberMarks can be used to specify whether` marks should be used to indicate type, precision, or accuracy of approximate numbers.»
Examples
open allclose allScope (8)
Basic Objects (2)
Special Input Forms (4)
Special Output Forms (2)
Some objects use a special output representation:
Some objects use an elided output representation:
The elided parts are visible usingInputForm:
Options (3)
Properties & Relations (4)
The typeset form ofInputForm[expr] is interpreted the same asexpr when used in input:
Copy the output and paste it into an input cell. Thex^2 is interpreted asx2:
When an input evaluates toInputForm[expr],InputForm does not appear in the output:
Out is assigned the valuex2, notInputForm[x^2]:
InputForm has a linear formatting:
FullForm has linear formatting without special syntax:
OutputForm,StandardForm, andTraditionalForm all provide two-dimensional formatting:
UseToString to generate a string in input form:
Possible Issues (1)
Even when an output omitsInputForm from the top level, it is not stripped from subexpressions:
The output does not haveInputForm in it:
However, the variablee does haveInputForm in it, which may affect subsequent evaluations:
The product is not evaluated due to the interveningInputForm:
Assign variables first and then applyInputForm to the result to maintain computability:
See Also
OutputForm FullForm StandardForm TextString Compress BinarySerialize
Function Repository:ReadableForm
Related Links
History
Introduced in 1988(1.0) |Updated in 1996(3.0)
Text
Wolfram Research (1988), InputForm, Wolfram Language function, https://reference.wolfram.com/language/ref/InputForm.html (updated 1996).
CMS
Wolfram Language. 1988. "InputForm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/InputForm.html.
APA
Wolfram Language. (1988). InputForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/InputForm.html
BibTeX
@misc{reference.wolfram_2025_inputform, author="Wolfram Research", title="{InputForm}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/InputForm.html}", note=[Accessed: 29-November-2025]}
BibLaTeX
@online{reference.wolfram_2025_inputform, organization={Wolfram Research}, title={InputForm}, year={1996}, url={https://reference.wolfram.com/language/ref/InputForm.html}, note=[Accessed: 29-November-2025]}
[8]ページ先頭