Movatterモバイル変換


[0]ホーム

URL:


WOLFRAM

Wolfram Language & System Documentation Center
InputForm

InputForm[expr]

prints as a version ofexpr suitable for input to the Wolfram Language.

Details and Options
Details and OptionsDetails and Options
Examples  
Basic Examples  
Scope  
Basic Objects  
Special Input Forms  
Special Output Forms  
Options  
NumberMarks  
Properties & Relations  
Possible Issues  
See Also
Tech Notes
Related Guides
Related Links
History
Cite this Page

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 all

Basic Examples  (2)

InputForm of a typeset expression:

InputForm of a graphic:

Scope  (8)

Basic Objects  (2)

Integer,Rational,Real, andComplex numbers:

ArbitraryprecisionReal andComplex numbers:

Special constants:

Characters and strings of characters:

Control characters for strings:

Special Input Forms  (4)

Different ways of representingPower expressions:

Special typeset expressions:

Different list structures:

Input without special interpretation:

With special characters in the same positions, there may be special interpretations:

In the case of superscripts, most things get interpreted asPower:

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)

NumberMarks  (3)

Machine numbers format without number marks by default:

The same number with number marks:

Extended-precision numbers include number marks by default:

Without number marks:

A mixed symbolic and numeric expression:

Include number marks for all numbers:

Omit all number marks:

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

Tech Notes

Related Guides

Related Links

History

Introduced in 1988(1.0) |Updated in 1996(3.0)

Wolfram Research (1988), InputForm, Wolfram Language function, https://reference.wolfram.com/language/ref/InputForm.html (updated 1996).

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]}

Top

[8]ページ先頭

©2009-2025 Movatter.jp