GNOME Bugzilla – Bug 116913
Feature request: an expression parser support
Last modified: 2004-12-22 21:47:04 UTC
Gcalctool should have support for parsing expressions so that user could write whole expression as a text and press enter to get it calculated. For example user should be able to write: "1 + sin(1) + cos(0)" This feature could be implemented as an additional mode. In this mode also the buttons should be functional. For example: if user hits the cos button, then button should add "cos(" to the text buffer/display containing the expression. Reason for request: Some users like more writing expressions and additionally errors/typos are more easier to locate and fix when the whole expression is visible. Additionally, there should be a (history) log for previous expressions. The user should be able to copy previous expressions from history and paste them to current expression buffer/display.
[cc:'ing Calum on this for the HIG'y things.] Note that this will be considered for the GNOME 2.5/6 timeframe. Sami and I discussed this a bit in email. Here are some of my comments: There is actually already the perfect place for this to go. That's in the user defined functions. As it is currently implemented, user defined functions require the user to type in the keyboard equivalent of each of the functions they want. Your expression parser is much nicer. It would be nice to add in the ability to handle the various functionality in the scientific mode panel. I.e. hex(23+45) ... The "Edit User Function" popup would have to be adjusted slightly. It should be able to add in functions and still keep the popup window on the screen so you can add more (or make further changes), so it'll probably need an "Ok" and an "Apply" button. One simple way of keeping a history is to allow the user to define an unlimited number of functions and just keep using a new one each time you define it. Alternately, gcalctool could have a separate history facility, in which case it should be a separate enhancement request.
Rich, can you close this bug. Here is several different issues, some of them duplicated in other bug reports. I think no issues are lost if this bug report is closed.
Yup, no problem. I definitely think you've implemented this functionality. Thanks.