The Stack (according to Free42 Manual)

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
mezoganet
Posts: 124
Joined: Tue Jan 22, 2019 1:54 pm
Location: Tours, France

Re: The Stack (according to Free42 Manual)

Post by mezoganet »

Joe Horn wrote:
Sat Feb 02, 2019 5:42 am
...
Fill the stack with 9, 8, 7, 6 (so Z=9 and X=6)
Press Roll-down 4 times to verify these contents.
Now press 2 ENTER (as he said to do).
The stack is now exactly as he said it would be, namely T=7, Z=6, Y=2, and X=2, with Z and T having been lost.
Hem, what you say is untrue as X,Y,Z and T does not exist in RPL (HP28S and siblings).

'Infinite stack' is the problem with RPL and explains why the error '<='/'DROP' occurred... This made me buy a HP42s and go back quickly to a normal RPN calculator as a replacement of the HP28s. I could use again my HP42s like I did with my HP33e, HP34c, HP41c, HP16c...

I don't mean 'Infinite stack' is bad, I just mean that it was not the way HP designed RPN starting with HP35.
HP33E, HP34C, HP41C, HP16C, HP28S, HP42S, HP48S, HP12C, HP35S, DM42, DM41L, DM15L, DM41X (SN#15) and HP3000 @ work during 18 yrs as IT Mgr
whuyse
Posts: 198
Joined: Thu Dec 21, 2017 1:23 pm

Re: The Stack (according to Free42 Manual)

Post by whuyse »

Perhaps you should read the first post in this thread before replying.. ;-)
This is about RPN on the DM42, and of course Joe's remarks are also entirely accurate, as usual.
(well, except for Z=9 which should've been T=9 ;-)

Cheers, Werner
41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE, DM15L
User avatar
ijabbott
Posts: 253
Joined: Fri Dec 15, 2017 2:34 pm
Location: GB-MAN

Re: The Stack (according to Free42 Manual)

Post by ijabbott »

I think the main advantage of the proper stack that can grow and shrink is that it makes it easy to write functions that behave like built-in functions without having to worry about preserving elements that would fall off the end of a fixed 4-level stack.
boessu
Posts: 22
Joined: Mon Jan 28, 2019 10:40 pm

Re: The Stack (according to Free42 Manual)

Post by boessu »

Thanks @Joe for your explanation. Now I see what José tried to tell me.

The implementation of the RPL (?, Never had one of them) was maybe better from a logical standpoint. But it seems as it has annoyed a lot of people if they tried to "clear" things. It seems that this happens more often than the engineers at HP thought... ;) This was maybe all correct but I can imagine the usability because of these messages was kind of annoying. I'm pretty sure I would have the same experience and the same conclusion after using them.

Actually, I never got into the situation where the xyzt implementation of RPN result in a real problem. Or I would had the need that it should be different. So that must be a discussion with faith too. ;-)
User avatar
akaTB
Posts: 794
Joined: Tue May 02, 2017 1:56 pm
Location: Milan, Italy

Re: The Stack (according to Free42 Manual)

Post by akaTB »

boessu wrote:
Sat Feb 02, 2019 1:43 pm
But it seems as it has annoyed a lot of people if they tried to "clear" things. It seems that this happens more often than the engineers at HP thought... ;)
Oh well, the same is true if you press ENTER, for example, on an empty stack.
Greetings,
    Massimo
ajcaton
-+×÷ left is right and right is wrong :twisted: Casted in gold
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: The Stack (according to Free42 Manual)

Post by Walter »

Thanks, Joe, you're right of course. Though boessu is right as well: simple LIFO, no moves beyond in the example quoted: [2] causes an automatic stack lift, and the succeeding ENTER causes a second stack lift. Two steps should not be described as one - this was the reason why I thought and called the quoted description being wrong. Sorry for writing ambiguously.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
toml_12953
Posts: 795
Joined: Wed May 03, 2017 7:46 pm
Location: Malone, NY USA

Re: The Stack (according to Free42 Manual)

Post by toml_12953 »

There's a great tutorial that explains RPN and the differences in HP implementations of it:

https://hansklav.home.xs4all.nl/rpn/index.html

There's nothing wrong with any of the implementations; there's just a preference for one over the other.
All the implementations are self-consistent even if they aren't consistent across HP lines. To a person who is an old
hand having learned and used RPN on the HP-35, 45, 65, etc. 2 ENTER * should display 4. To a relative newcomer, that sequence
makes no sense.
Tom L

Some people call me inept but I'm as ept as anybody!
DM10L SN: 059/100
DM41X SN: 00023 (Beta)
DM41X SN: 00506 (Shipping)
DM42 SN: 00025 (Beta)
DM42 SN: 00221 (Shipping)
WP43 SN: 00025 (Prototype)
boessu
Posts: 22
Joined: Mon Jan 28, 2019 10:40 pm

Re: The Stack (according to Free42 Manual)

Post by boessu »

Thanks toml_12953 for the link. That's by far the best RPN tutorial I've ever seen!
It shows how much easier it is to understand in the DM42 (because you always see the whole stack) and it also shows the limits of the 4-stack RPN's with a rather simple example (XXVII).
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: The Stack (according to Free42 Manual)

Post by Walter »

Explicitly showing the limits of the 4-register stack in calculating is Hans' new contribution to the topic. HP did never mention it in a manual IIRC.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
User avatar
ijabbott
Posts: 253
Joined: Fri Dec 15, 2017 2:34 pm
Location: GB-MAN

Re: The Stack (according to Free42 Manual)

Post by ijabbott »

Walter wrote:
Sun Feb 03, 2019 3:26 pm
Explicitly showing the limits of the 4-register stack in calculating is Hans' new contribution to the topic. HP did never mention it in a manual IIRC.
HP not mentioning it is hardly a surprise! :)
Post Reply