After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 116913 - Feature request: an expression parser support
Feature request: an expression parser support
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2003-07-07 18:39 UTC by Sami Pietila
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sami Pietila 2003-07-07 18:39:12 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.
Comment 1 Rich Burridge 2003-07-07 19:08:15 UTC
[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.
Comment 2 Sami Pietilä 2004-07-23 11:40:55 UTC
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.
Comment 3 Rich Burridge 2004-07-23 14:08:59 UTC
Yup, no problem. I definitely think you've implemented this
functionality. Thanks.