BUILT-IN WOLFRAM LANGUAGE SYMBOL

QuantityForm

QuantityForm[expr,form]
prints with all Quantity expressions in expr using the specified unit display form form.

QuantityForm[expr,{forms}]
prints expr using the appropriate combination of the specified unit display forms forms.

DetailsDetails

  • The following unit display forms can be specified: , .
  • can be included as a display form specification to force descriptions to their singular tense.
  • If expr is a canonical unit, QuantityForm will print with the specified form of the unit.
  • QuantityForm acts as a "wrapper", which affects printing, but not evaluation.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Display a Quantity using its description:

In[1]:=
Click for copyable input
Out[1]//QuantityForm=

Display a unit with multiple form specifications:

In[1]:=
Click for copyable input
Out[1]//QuantityForm=
In[2]:=
Click for copyable input
Out[2]//QuantityForm=
In[3]:=
Click for copyable input
Out[3]//QuantityForm=
Introduced in 2012
(9.0)