"Quantity" (Interpreter Type)

Natural-language quantity with units.

Details

  • "Quantity" can be used in Interpreter and related constructs, including deployed smart form fields.
  • Use of "Quantity" requires connectivity to the Wolfram Cloud.

Allowed Forms

  • All the natural-language numbers allowed by "SemanticNumber" are supported for the quantity magnitude.
  • Examples of unit specifications include:
  • one dimenatural-language units
    8.9 hours per day/personcompound units
    30 °Cunit abbreviations and symbols
    10 milespostfix units
    $99.99prefix units

Restriction Specifications

Interpretation

Examples

Basic Examples  (3)

Interpret quantities of any kind:

Interpret quantities in natural language:

Restrict and convert to a unit:

Restrict in an interval:

Restrict to a given physical quantity:

Accept unitless inputs in the presence of an appropriate restriction:

Set the precision: