UNITWITH
From iMath
Revision as of 07:18, 1 July 2017 by Jrheinlaender (Talk | contribs) (Created page with "{{Keyword | <code>UNITWITH ( expression, equation|equation list )</code> | Try to find a quantity (number with optional units) for the expression from any equ...")
Contents
Syntax
UNITWITH ( 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. Return the units of this result. Gives an error if the expression does not evaluate to a quantity.
Example
EQDEF a = 3 x
EQDEF b = 2 x
EXDEF UNITWITH(a + b, x = 7 %metre)
This will output "m".