#12 Stack entry.

open
nobody
None
5
2012-12-14
2008-06-23
EarloftheWest
No

Currently, data is entered into the entry line. When 'enter' is pressed, the entry line continues to contain the number just entered. This becomes problematic and doesn't follow traditional RPN usage.
First, some background.
The entry line is functioning as the entry key and the top of the stack. This becomes problematic.
With traditional implementation of RPN, there are 3 areas for data: The entry line, the top of the stack, and the rest of the stack. See the following for an example implementation:
http://webonastick.com/rpncalc/
In the HP calculator implementation, line 1 of the stack acts as the entry line and the top of the stack depending upon what the user is doing. When a user types data, the stack moves up and the entry line is displayed. After entered is pressed, the entry line is replaced by line 1 of the stack.
In galculator, the entry line continues to display the number that was just entered in the stack.
In HP calculator usage, if I enter 15 and press enter, the number 15 will be on the stack. If at that point I press the + button, I will get a 'too few arguments' error. In galculator, if I enter 15 press the enter button, 15 will be on line 1 and 15 will be in the entry line. Pressing the + button would yield me 30 rather than the expected too few arguments error.
I suggest that galculator should follow the HP implementation since that is the standard of RPN implementation.

Discussion