[WP34s] A few humble suggestions - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: [WP34s] A few humble suggestions (/thread-229567.html) |
[WP34s] A few humble suggestions - Dieter - 08-19-2012 After using the 34s (emulator) for a while, I would like to suggest some possible improvements of the 34s user interface. Most of this is not exactly new, but that does not make it less useful. ;-)
Dieter
Re: [WP34s] A few humble suggestions - fhub - 08-19-2012 Hi Dieter, a short remark about your point 2) Exactly the same request I've already posted quite some time ago, but then I removed my post again because I found that this is already possible with a little trick:
If you single-step through a program and come to a 'XEQ lbl' so that this XEQ is the last command executed with the DownArrow key, the program counter is set to the called label. If you want to execute this subroutine at once (without single-stepping through it), then just use the R/S key, which does exactly what you want: it runs the subroutine until the RTN or END, and the PC is back again, i.e. after this you can just continue to single-step through your main program again by the usual DnArrow. But I haven't yet tried if/how this works for nested XEQs, i.e. if the subroutine calls another one - but I guess such a R/S will always execute a _complete_ subroutine (incl. nested ones). Franz
Edited: 19 Aug 2012, 11:32 a.m.
Re: [WP34s] A few humble answers - Walter B - 08-19-2012 Dieter,
Thanks for sharing your thoughts. I refer to your suggestion numbers:
Re: [WP34s] A few humble answers - fhub - 08-19-2012 Quote:Not necessary, this feature already exists. :-) See my posting above - R/S is the 'key' (in both meanings) ... ;-) Franz
Edited: 19 Aug 2012, 11:54 a.m.
Re: [WP34s] A few humble suggestions - Dieter - 08-19-2012 Ah, yes, indeed this seems to work. Great. :-) On the other hand this behaviour might be related to point 4., i.e. the program pointer not being updated after a program call from the keyboard. This way it stays where it was at the last line before the subroutine was called. Which turns a bug into a feature. :-) While it remains a bug in all other cases. #-\ Anyway, thank you for this information. BTW it does not seem to work with nested subroutines. In this case [R/S] seems to run through all the follwing subroutines until the return stack is empty, i.e. the top level is reached again.
Dieter
Re: [WP34s] A few humble answers - Dieter - 08-19-2012 Quote:Yes, it seems to work - in a limited way (see my other post). But I feel this just is a side-effect of a bug - or let's say, an unexpected feature - of the current 34s implementation. I do not know if this still works once this has been changed. BTW, as far as I remember the 19C/29C also used the [R/S] key for their "procedure step" feature. ;-) Currently I cannot check this because since last year my 29C sits inoperably in a drawer. *sniff* :-(
Dieter
Re: [WP34s] A few humble answers - fhub - 08-19-2012 Quote:Well, I won't call this a bug at all - IMO this is exactly as I expect it. If you do a R/S in manual mode then the program runs until reaching a RTN/END and this resets the PC to the value he had before executing R/S. I don't think this should work different, and I hope they don't change this at all. Also what you wrote in your other answer is quite logical for me: if you do a R/S while single-stepping then this is in manual mode, and if the subroutine is calling another nested subroutine, then this is done in run-mode and so it doesn't stop of course at a RTN but just returns to the outer routine - only this top-level routine is stopped because it is called in manual mode. I would say everything is ok as it is. But of course editing a program by deleting a few lines is no 'usual' action to use a program, so you can't expect the PC to be exactly where you would like it (and a manual RTN after such an editing action is not really much work ;-)). Franz
Edited: 19 Aug 2012, 1:46 p.m.
Re: [WP34s] A few humble answers - Dieter - 08-19-2012 Quote:I beg to differ. :-) I would expect the 34s to behave just as any other HP I used before: If a running program stops, switching to PRGM mode shows the step where it stopped, resp. the next one. This is also what the 34s does in most cases: if an error occurs or the program stops due to a STOP command, that's what actually happens. But it does not behave this way if RTN is used instead. Classic HPs behave in two different ways if the program stops at a RTN statement (because there is no calling subroutine). They either stop and reset the program pointer to step 000 (e.g. the 34C and 35s behave this way), or they stop at the line number following the RTN, just as if it was a STOP statement (that's what the 41-series does). But I cannot find any sense in returning to the step where the calculator was positioned before the program was run.
Dieter
Re: [WP34s] A few humble answers - Luiz C. Vieira (Brazil) - 08-19-2012 Hi. About executing a subroutine with a single key while step-by-step running a program: the HP48S introduced a very closer feature with the [SSTv] (SST and a down-arrow). The [SSTv] works the same as the [SST] if a regular built-in object is evaluated. But if it is a user-defined object, [SSTv] evaluates it as a whole and returns the result after its evaluation. [SSTv] continues evaluating the next object in the main program. I used this feature many times, wishing to find some equivalent in any RPN-based calculator, but only the RPL series had it. It allows faster debugging of the main program when you are sure the subroutines are OK, mostly if they are shared with other programs. Of course, there is also the issue about the difference between what is a subroutine in both RPL- and RPN-based calculators. Cheers.
Luiz (Brazil) Edited: 19 Aug 2012, 4:32 p.m.
Re: [WP34s] A few humble suggestions - Paul Dale - 08-19-2012 The behaviour in point 4 is intentional. We had a long and winding discussion about what the RTN at the end of a program should do. There were quite a few options -- leave the PC as is, move PC to address 0 which is start of RAM, move PC to start of the library, move PC to the beginning of the program, set PC to the address the subroutine was called from. Most have advantages and disadvantages.
- Pauli
Re: [WP34s] A few humble suggestions - Pete Wilson - 08-20-2012 Forgetting Label A exists is intentional?
Re: [WP34s] A few humble suggestions - Marcus von Cube, Germany - 08-20-2012 When we added the 'sticky' catalogs we just didn't have enough RAM to store the position of each catalogue. With the advent of version 3 and its advanced memory handling, we can think about the feature again. (I don't promise we actually will!)
"LBL not found" is definitely a bug while the preservation of the program counter when a subroutine is executed manually from the keyboard (hotkey or XEQ) works as designed. One (internal) reason for this behavior is that many internal commands are just subroutines in XROM: The program counter must not be affected by such a command. We generalized this behavior to any subroutine called from the keyboard. The question is: What is the 'proper' position of the program counter after a subroutine call from the keyboard? Not affecting it at all seems the least surprising way of dealing with this.
Re: [WP34s] A few humble suggestions - Marcus von Cube, Germany - 08-20-2012 No, not this one. I'll investigate.
Re: [WP34s] A few humble suggestions - Dieter - 08-20-2012 Quote:Ah, great - I'm a big fan of the POLA principle. The least surprising way for a long-time HP user sure is the way earlier HP calculators did it. Most of them simply return to the top of program memory, i.e. step 000. The HP-41 handles RTN (if not called from a higher level routine) like a simple STOP, i.e. it stops and stays where it is. That's why I was so surprised that the 34s, a machine dedicated to the HP heritage of their glorious days, works completely different in this respect. In other words this is the most surprising way. ;-)
Dieter
Re: [WP34s] A few humble suggestions - Nigel J Dowrick - 08-20-2012 Although I wasn't actually involved in the big discussion leading up to the decision on what the program counter should do, it was an observation of mine (I think) that started it off. (fhub had a lot to do with it as well!) Imagine a program that has stopped and is either displaying a result or waiting for input. I wanted to be able to call a second program from the keyboard and still be able to carry on with the first program when the second program was complete. So calling the second program would be like calling a built-in function such as SIN or SQRT: it wouldn't permanently change the position of the program counter. I found that this didn't work, because when the second program RTNed the program counter didn't go back to where it had been and so the first program couldn't continue. The behaviour was changed (after a lot of interesting discussion!) so that a program called from the keyboard can now run without permanently changing the value of the program counter. I can see that this behaviour would seem surprising if it isn't shared by other HP calculators, but I was surprised when RTN didn't seem to be doing what I felt it should! I hope that this helps explain why things are as they are.
Nigel (UK)
|