Unit not cleared during operation
Try this (assuming you have foot
defined)`:
a = meter->foot ? Don't even think about adding parentheses here. That's another issue.
= 3.28083989501312335958 foot
a*second
= 3.28083989501312335958 foot
Comments (8)
-
-
reporter I bet the problem was introduced with my recent number type refactor. It's fixed now ^^
The parentheses thing is unrelated. Your parser refactor should deal with that one ;)
-
Oops sorry, was unrelated indeed.
-
repo owner - changed status to closed
-
repo owner - changed component to mathengine
-
repo owner See pull request #52.
-
@Teyut: I like the way you implement my idea. I tried to implement it by attaching the text to the token value, in the stack containing the values, but it was not successful because I also needed information in the references stack, so I would have needed to make the same change also for the reference stack. So, I'll continue on your approach.
-
@thadrien sorry, didn't realize you were working on it already. TBH I didn't think your idea could be implemented easily, so I gave it a try while waiting for my plane, and it appeared I was wrong :) I'm not sure there is much more changes to add, but anyway, we should probably discuss that in issue #589 instead of here.
- Log in to comment
You might want to have a look at my (out of sync) parser branch which is an attempt to implement @thadrien suggestion to carry the original text with the token. The problem does not occur with the changes in that branch.
On a probably related note:
(10 meter -> meter)
gives10 meter)
(with extra parenthesis).Edit: okay, seeing your fix, it's probably not related in the end.