QuantityForm

QuantityForm[expr,form]

prints expr with all Quantity expressions using the specified unit display form form.

QuantityForm[expr,{forms}]

prints expr using the appropriate combination of the specified unit display forms forms.

Details

  • The following unit display forms can be specified: "Abbreviation", "LongForm".
  • "SingularForm" can be included as a display form specification to force "LongForm" 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.

Examples

open allclose all

Basic Examples  (2)

Display a quantity using its "LongForm" description:

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

Display quantities with multiple unit 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=

Scope  (5)

Applications  (1)

Properties & Relations  (3)

Possible Issues  (1)

See Also

Quantity  QuantityMagnitude  QuantityUnit  NumberForm  Style

Tutorials

Introduced in 2012
(9.0)