Re: 17bii unit conversions Message #6 Posted by Dave Britten on 26 Mar 2012, 11:26 a.m., in response to message #5 by Don Shepherd
This is what I tried so far (on my 200LX, so the syntax and formatting will be a tiny bit different). It doesn't seem to behave as desired, though.
L(val:IF(S(mm):mm/10:0)+IF(S(m):m*100:0)+IF(S(cm):cm:0))=IF(i=1:cm:L(cm:val)*L(i:1))
The idea would be to do Clear Data, store the value into the appropriate starting unit, then immediately solve for that unit. That will convert it to cm and store that value in cm. (The variable i is used to indicate if the solver has been initialized.) Then you would be able to pick any of the other units in the formula, and it will convert them from cm.
I suspect something is going wrong with setting val on the left side, and stuffing it into cm on the right side. When I clear the solver, store a value into mm, and solve for mm, it just zeros out mm, cm, and val, and sets i to 1. If I remove '*L(i:1)' from the right side to prevent initializing i, it initializes cm properly, but then you can't solve for the other units.
|