StandardForm
StandardForm[expr]
prints as the standard Wolfram Language two-dimensional representation of expr.
Details
- StandardForm generates output that gives a unique and unambiguous representation of Wolfram Language expressions, suitable for use as input. »
- StandardForm incorporates many aspects of traditional mathematical notation.
- StandardForm is the standard format type used for both input and output of Wolfram Language expressions in notebooks.
- Graphics and Graphics3D are displayed graphically in StandardForm.
- StandardForm can be edited in the notebook front end.
- StandardForm uses special characters as well as ordinary keyboard characters.
- StandardForm is based on boxes.
- The notebook front end contains menu items for conversion to and from StandardForm.
- When an input evaluates to StandardForm[expr], StandardForm does not appear in the output. »
Examples
open allclose allBasic Examples (2)
Scope (7)
Basic Objects (2)
Special Input Forms (3)
Properties & Relations (5)
When an input evaluates to StandardForm[expr], StandardForm does not appear in the output:
Out is assigned the value x2, not StandardForm[x^2]:
StandardForm is two-dimensional unambiguous formatting:
OutputForm approximates StandardForm using keyboard characters:
TraditionalForm is two-dimensional, but ambiguous formatting:
InputForm and FullForm provide one-dimensional formatting:
Use ToString to generate a string in StandardForm:
The string includes two-dimensional markup:
Use ToExpression to convert back:
Use ToBoxes to get the box representation of an expression in StandardForm:
Use ToExpression to convert back:
Add formatting via Format:
Possible Issues (1)
Even when an output omits StandardForm from the top level, it is not stripped from subexpressions:
The output does not have StandardForm in it:
However, the variable e does have StandardForm in it, which may affect subsequent evaluations:
The product is not evaluated due to the intervening StandardForm:
Assign variables first and then apply StandardForm to the result to maintain computability:
Text
Wolfram Research (1996), StandardForm, Wolfram Language function, https://reference.wolfram.com/language/ref/StandardForm.html (updated 2007).
CMS
Wolfram Language. 1996. "StandardForm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/StandardForm.html.
APA
Wolfram Language. (1996). StandardForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StandardForm.html