QuantityQ

QuantityQ[expr]

gives True if expr is a Quantity with valid arguments, and False otherwise.

Details

  • QuantityQ[expr] returns False unless expr is a Quantity expression with valid arguments (i.e. has a canonical unit).

Examples

open allclose all

Basic Examples  (1)

QuantityQ tests whether an object is a Quantity with valid arguments:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Applications  (1)

Properties & Relations  (3)

See Also

Quantity  KnownUnitQ

Tutorials

Introduced in 2012
(9.0)