"Quantity" (Interpreter Type)
-
See Also
- Quantity
- QuantityVariable
- QuantityVariablePhysicalQuantity
- QuantityVariableCanonicalUnit
- Interpreter
- SemanticImport
- Restricted
- Failure
- UnitConvert
-
- Interpreter Types
- StructuredQuantity
- ComputedQuantity
- PhysicalQuantity
- Age
- Percent
- PercentFraction
- HeuristicPercent
- CurrencyAmount
- CurrencyName
- Number
- ComputedAge
- ComputedPercent
- ComputedPercentFraction
- ComputedHeuristicPercent
- ComputedCurrencyAmount
- SemanticNumber
- ComputedNumber
-
- Text Contents
- Quantity
- Related Guides
-
-
See Also
- Quantity
- QuantityVariable
- QuantityVariablePhysicalQuantity
- QuantityVariableCanonicalUnit
- Interpreter
- SemanticImport
- Restricted
- Failure
- UnitConvert
-
- Interpreter Types
- StructuredQuantity
- ComputedQuantity
- PhysicalQuantity
- Age
- Percent
- PercentFraction
- HeuristicPercent
- CurrencyAmount
- CurrencyName
- Number
- ComputedAge
- ComputedPercent
- ComputedPercentFraction
- ComputedHeuristicPercent
- ComputedCurrencyAmount
- SemanticNumber
- ComputedNumber
-
- Text Contents
- Quantity
- Related Guides
-
See Also
"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 dime natural-language units 8.9 hours per day/person compound units 30 °C unit abbreviations and symbols 10 miles postfix units $99.99 prefix units
Restriction Specifications
-
Restricted["Quantity",{{choices1,…}}] one among choices Restricted["Quantity",unit] convert to unit Restricted["Quantity",quantityvariable] restrict to units compatible with the physical quantity of quantityvariable Restricted["Quantity",unit,max] a quantity below Quantity[max,unit] Restricted["Quantity",unit,{min,max}] a quantity between Quantity[min,unit] and Quantity[max,unit] Restricted["Quantity",unit,{min,max,s}] a quantity between Quantity[min,unit] and Quantity[max,unit] with step s Restricted["Quantity",quantityvariable,max] a quantity below Quantity[max,unit], with unit the canonical unit of quantityvariable Restricted["Quantity",Automatic,Automatic,n] a quantity whose magnitude has n-digit precision - The bounds min and max and step s can also be expressed as quantities.
- Interpreter[quantityvariable] is equivalent to Interpreter["Quantity",quantityvariable].
Interpretation
- "Quantity" yields a Quantity.
See Also
Quantity QuantityVariable QuantityVariablePhysicalQuantity QuantityVariableCanonicalUnit Interpreter SemanticImport Restricted Failure UnitConvert
Interpreter Types: StructuredQuantity ComputedQuantity PhysicalQuantity Age Percent PercentFraction HeuristicPercent CurrencyAmount CurrencyName Number ComputedAge ComputedPercent ComputedPercentFraction ComputedHeuristicPercent ComputedCurrencyAmount SemanticNumber ComputedNumber
Text Contents: Quantity