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: 49
Joined: Tue Jan 22, 2019 12:54 pm
Location: Tours, France

Re: The Stack (according to Free42 Manual)

Post by mezoganet » Sat Feb 02, 2019 6:22 am

Joe Horn wrote:
Sat Feb 02, 2019 4: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 and HP3000 @ work during 18 yrs as IT Mgr

whuyse
Posts: 42
Joined: Thu Dec 21, 2017 12:23 pm

Re: The Stack (according to Free42 Manual)

Post by whuyse » Sat Feb 02, 2019 10:01 am

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
42S #3249S01123
DM42 #00345

User avatar
ijabbott
Posts: 164
Joined: Fri Dec 15, 2017 1:34 pm
Location: GB-MAN

Re: The Stack (according to Free42 Manual)

Post by ijabbott » Sat Feb 02, 2019 11:28 am

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: 15
Joined: Mon Jan 28, 2019 9:40 pm

Re: The Stack (according to Free42 Manual)

Post by boessu » Sat Feb 02, 2019 12:43 pm

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: 298
Joined: Tue May 02, 2017 11:56 am

Re: The Stack (according to Free42 Manual)

Post by akaTB » Sat Feb 02, 2019 1:09 pm

boessu wrote:
Sat Feb 02, 2019 12: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

-+×÷ left is right and right is wrong :twisted: Casted in gold

User avatar
Walter
Posts: 1058
Joined: Tue May 02, 2017 9:13 am
Location: Close to FRA, Germany

Re: The Stack (according to Free42 Manual)

Post by Walter » Sat Feb 02, 2019 1:29 pm

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.
DM42 SN: 00041 --- Follower of Platon.

HP-35, HP-45, ..., HP-50, WP 34S, WP 31S, DM16L

toml_12953
Posts: 523
Joined: Wed May 03, 2017 5:46 pm
Location: Malone, NY USA

Re: The Stack (according to Free42 Manual)

Post by toml_12953 » Sun Feb 03, 2019 3:24 am

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

My father was a man of the cloth. He was a tailor.

DM42 SN: 00025 (Beta)
SN: 00221 (Shipping)

boessu
Posts: 15
Joined: Mon Jan 28, 2019 9:40 pm

Re: The Stack (according to Free42 Manual)

Post by boessu » Sun Feb 03, 2019 1:18 pm

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: 1058
Joined: Tue May 02, 2017 9:13 am
Location: Close to FRA, Germany

Re: The Stack (according to Free42 Manual)

Post by Walter » Sun Feb 03, 2019 2: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.
DM42 SN: 00041 --- Follower of Platon.

HP-35, HP-45, ..., HP-50, WP 34S, WP 31S, DM16L

User avatar
ijabbott
Posts: 164
Joined: Fri Dec 15, 2017 1:34 pm
Location: GB-MAN

Re: The Stack (according to Free42 Manual)

Post by ijabbott » Sun Feb 03, 2019 6:36 pm

Walter wrote:
Sun Feb 03, 2019 2: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