▼
Posts: 149
Threads: 22
Joined: Feb 2009
I read the page here that goes into showing the basics of RPN. I read about the stack and that is quite fascinating. In the example all the registers on the stack are loaded with numbers. Hitting 'clx' clears the display register, but all the other registers have data in them, right?
How do you 'clear' all the stacks? Is there ever a need to have to worry about that?
Sorry to be such a pain, this stuff is interesting!
joe
▼
Posts: 4,027
Threads: 172
Joined: Aug 2005
Hi;
in some circumstances it's a good idea to clear the stack to avoid using "garbage" if you press a wrong key. If the stack is empty, you can enter any number and accidentaly press [+] that you have no trouble. This is valid only for RPN models. RPL ones (HP28/48/49) demand two existing operators. RPN stack is always there, and its contets when cleared are all zeroes.
HP67/97 do not have an specific stack clearing procedure. The HP55 clears the stack if you clear registers ([f][CLR] or [g][CL.R]). All voyagers, except the HP16C, have the stack contents cleared when you perform statistics registers clearing ([f]CLEAR[Ê], where Ê means sigma greek letter). The HP12C is particularly different because the [f] CLEAR[REGS] clears everything, including the stack. I am not quite sure, but [f]CLEAR[FIN] keeps stack contents.
Both HP41 and HP42 have the CLST, that is the only specific function to LCear STack contents in these models.
RPL models have CLEAR function that clears numbered-levels contents.
Hope this helps. If I forgot something, please forgive-me: almost every information I post here is written by heart, except when I mention page numbers... ;-)
Luiz C. Vieira - Brazil
Posts: 237
Threads: 20
Joined: Mar 2006
I am doing this from memory, with only the 48GX in front of me. I'm not sure about the older models, pre 41C, but there is a command called CLST (Clear Stack) that will clear the stack. On the 41C/CV/CX do an XEQ {Alpha] CLST [Alpha], this can be assigned to a key if you plan to use it allot. I think on the 15C, it is a shifted key command left of the ENTER key. On the 42S, 28C/S, & 48S/G Series it is accessable from a menu.
Hope this helps.
Richard Garner
▼
Posts: 294
Threads: 32
Joined: Jul 2005
In the 15c, CLEAR SIGMA ( f GSB ) puts a O into statistic registers AND in the four stack levels.
Raul
▼
Posts: 4
Threads: 0
Joined: Jan 1970
If you have a HP25 there is a clear stack command as I think there is on the HP45. On the 25 it's [f,clx], I think most of the classic machines that had a summation function also had clear stack capability because the summation made use of the stack. Quick way to check is to look at pictures of machines on MoHP site.
Regards Richard.
Posts: 1,792
Threads: 62
Joined: Jan 2005
"In the 15c, CLEAR SIGMA ( f GSB ) puts a O into statistic registers AND in the four stack levels."
Works for the real stack, but does not touch the imaginary stack if in complex mode. CLx, ENTER, ENTER, ENTER also fails to clear the imaginary stack, because CLx works only on the real X-register by design.
0, ENTER, ENTER, ENTER will clear both stacks.
CLEAR SIGMA, CF 8 will clear the real stack and eliminate the imaginary stack.
Posts: 172
Threads: 21
Joined: Sep 2005
Joe,
IMHO the reason why you need not worry about clearing the stack lies in the nature of the RPN itself. As you always see every intermediate result and the new argument pushes them up, you intuitivly know what will come down again.
Disregarding the RPL calculators (HP28, HP48, ...) only the HP42S shows the Y stack value in display, though, by my experience, this may sometimes be a bit confusing.
CLx is a very important operation, as it operates in a similar way ENTER does: disabling stack lift for the next enter argument. This is a trivial (but important) fact.
Posts: 149
Threads: 22
Joined: Feb 2009
Thanks guys!
The more I read about all these things, the more I like them. I have allways been a fan of HP calculators and finding this site has been awesome.
Thank you again to all that have posted to my question.
joe
▼
Posts: 266
Threads: 32
Joined: Jan 1970
Then there's people like me who can't remember which clear function on which model does what. However, on just about any model you can clear the stack by pressing CLx, ENTER, ENTER, ENTER.
Quicker than spelling out CLST (or whatever it is called) on the 41's alpha display.
Not good for programming of course, but there you have an incentive to invest the time to do it right.
▼
Posts: 4,027
Threads: 172
Joined: Aug 2005
Hi;
that's exactly the way one find in the HP67 User's Manual, p. 80, bottom of page. As explained there, [f] [CL REG] does not change stack registers' contents.
And you're right: works in any RPN calculator.
Luiz C. Vieira - Brazil
|