I’m having fun with the calc, kicking the Eval out of my code and having to learn what a monotype font is!
I don’t consider it finished because of 2 details:
- I’ve made a process very close to the one used by MS calculator, if you don’t insert new values for the new operator the previous total will be used. This is fine with the operators except for minus, because if you repeat a negative result with a minus operator it makes a double minus adding the value and not subtracting it - mathematically it is correct but it can confuse most users I guess (as it also made me wonder what the hell I was doing with minus operations, lol).
Should I keep it and confuse potential users (because it is correct) or block the usage of the total in all operations?
- A feature that makes me wonder is that if it is possible to also use the keyboard with the calculator to insert numbers and operations (and it seems it is with keyPress), as it already been made by older (or faster) members? any input about it?
Here is the first attempt:
I may have some unnoticed errors, js results aren’t exactly friedly when it comes to mathematics, any help will be apreciated… thanx!