| Log Message: |
backport (dpvc): Provides a formula with units (as opposed to a number
with units). This does introduce some ambiguity issues, since variable
names could look like units in some cases. E.g., s + 5 m/s could look
like (s + 5*m/s) rather than (s + 5) meters/second.
The parser will take the largest string at the end of the answer that
could be treated as units so s + 5m/s is (s+5) meters/second.
The Units.pm library requries units to be separated by * or / and
only one / is allowed, so s + 5m s is (s+5m) seconds not (s+5) m*s.
Something like 5 m/s/s will generate an error (it shouold be written
m/s*s or m/s^2), and 5 kg m/s should be written 5 kg*m/s.
[If we made the hash of known units be public rather than private in
Units, we could do a better job of this, and could treat kg m/s as
kg*m/s for example.]
|