|
|
Implementing PEMDAS
Probably harder than you think. I agree. As the user enters numbers and operators, you've got to keep track of what's been entered and what's okay to calculate now. With left-to-right entry and evaluation, you can evaluate expressions as the user enters them. This is probably why Apple went with LTR over PEMDAS -- it's easier to implement. To implement PEMDAS, you really need to have parenthesis available, or you're not able to use the intermediate result of a lower-order calculation as an operand to a higher-order calculation. For example,
Implementing PEMDAS
Not really, all you're doing is building a string to send to the JavaScript eval() function. The engine handles PEMDAS just fine and since there aren't buttons for P and E, it's limited right now to the rather simple MDAS.
Implementing PEMDAS
I've got the JavaScript done for a drop-in replacement if anyone wants it. I'll start messing with a polished implementation with a setting on the back et. al., but I've done a lot more JavaScript than I have widget work, so I don't know when it will be done.
Implementing PEMDAS
Option Enabled MDAS awareCalculator Widget variant.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.53 seconds |
|