Post Reply 
[34S] Proposal for Entry RPN mode with dynamic stack
02-18-2015, 12:47 AM
Post: #27
RE: [34S] Proposal for Entry RPN mode with dynamic stack
(02-16-2015 07:47 PM)Bit Wrote:  
(02-16-2015 07:26 PM)matthiaspaul Wrote:  
Matthias, if it's not too much effort, could you point me to a detailed, strictly precise description of exactly how the 'Entry RPN' mode should work including all corner cases? Something that'd pass as a formal definition?
Unfortunately, I don't have the time for that right now. But if we ignore the dynamic stack proposal for a moment (as it is independent of Entry RPN), what I am proposing is basically down to a changed behaviour of the ENTER key in "Entry RPN mode". It should continue to work exactly as before in "Classical RPN mode", in order to please those who are accostumed to it.

I had hoped (but I am obviously missing something) that such a change would be not much more than:

xeq.c:
Code:

...
static void specials(const opcode op) {
...
case OP_ENTER:
   process_cmdline();
   lift();
   clr_lift();
   break;
...
into
Code:

...
   int last_opm = OP_DUMMY;
   byte rpn_mode = RPN_CLASSICAL;
...
static void specials(const opcode op) {
...
case OP_ENTER:
   process_cmdline();
   if ((rpn_mode == RPN_CLASSICAL) || (last_opm == opm)) {
      lift();
      clr_lift();
   }
   last_opm = opm;
   break;
...
Please bear with me, if I'm completely off here - scanning over the sources for 30 minutes, I obviously still have only a very vague idea of the actual implementation in the WP 34S.
Quote:Perhaps I'm being overly paranoid and this particular feature is actually quite simple, but it has been my experience that a reasonable explanation that covers 99.99% of cases and is basically good enough in practice, versus getting it 100.00% right, are often two very different things.
I often make this experience as well. The hardest part is the remaining 10-20% in a project (whatever it is), but this is also the part making a difference between "good enough" and brilliant.

Greetings,

Matthias


--
"Programs are poems for computers."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [34S] Proposal for Entry RPN mode with dynamic stack - matthiaspaul - 02-18-2015 12:47 AM



User(s) browsing this thread: 1 Guest(s)