Difference between revisions of "QUANTITYWITH"
From iMath
m |
|||
Line 17: | Line 17: | ||
| | | | ||
4= | 4= | ||
− | [[QUANTITY]] [[NUMVAL]] [[NUMVALWITH]] [[VAL]] [[VALWITH]] [[UNIT]] [[UNITWITH]] | + | [[QUANTITY]] [[NUMVAL]] [[NUMVALWITH]] [[VAL]] [[VALWITH]] [[AVAL]] [[AVALWITH]] [[UNIT]] [[UNITWITH]] |
}} | }} | ||
[[Category:Evaluation]] | [[Category:Evaluation]] |
Latest revision as of 19:23, 15 October 2018
Contents
Syntax
QUANTITYWITH ( expression, equation|equation list )
Implemented in iMath since version 2.2.0 or earlier.
Explanation
Try to find a quantity (number with optional units) for the expression from any equations defined previously in the document, plus the equations given as the second argument. Gives an error if the expression does not evaluate to a quantity.
All numerical values will be converted to floating point numbers. If you do not want this, use VAL
instead.
Example
EQDEF a = 3 x
EQDEF b = 2 x
EXDEF QUANTITYWITH(a + b, x = 7 %metre)
This will output 35 "m".
See also
QUANTITY NUMVAL NUMVALWITH VAL VALWITH AVAL AVALWITH UNIT UNITWITH