The Museum of HP Calculators

HP Forum Archive 20

[ Return to Index | Top of Index ]

Wp34s STAT and PRG doubts
Message #1 Posted by Cristian Arezzini on 13 June 2011, 2:47 a.m.

Here are two more things that might be bugs or intended behavior... I didn't find informations on the manual telling me either way.

1) I have entered several data points with Sigma+. Then I chose, from the STAT catalog, x^ (the ^ goes above the x of course), and the calc showed a numerical value, and "Linear" on top. If then I press the up/down arrows, on the top line, I see the contents of the program memory, and the numerical value changes according to the step that is displayed above. I know next to nothing about statistics, but this looks like a strange behavior...

2) If I want to write a program that as the first thing, it duplicates what is in x to y (like the DUP command of RPL), I have to put two ENTER steps. I thought just one should do. Why does the first ENTER do nothing?

Thanks, Cristian

      
Re: Wp34s STAT and PRG doubts
Message #2 Posted by Paul Dale on 13 June 2011, 3:44 a.m.,
in response to message #1 by Cristian Arezzini

Quote:
1) I have entered several data points with Sigma+. Then I chose, from the STAT catalog, x^ (the ^ goes above the x of course), and the calc showed a numerical value, and "Linear" on top. If then I press the up/down arrows, on the top line, I see the contents of the program memory, and the numerical value changes according to the step that is displayed above.

What did you expect the up and down arrows to do here?

They are in fact single stepping whatever program you have in memory & even if you don't have a program, they'll show step 000. The x^ operation has finished.

Quote:
2) If I want to write a program that as the first thing, it duplicates what is in x to y (like the DUP command of RPL), I have to put two ENTER steps. I thought just one should do. Why does the first ENTER do nothing?

You are probably getting caught by ENTER duplicating x into y and disabling stack lift. If you enter a number after ENTER, whatever in x is destroyed. As a fix RCL X should do what you want.

- Pauli

Edited: 13 June 2011, 3:48 a.m.

            
Re: Wp34s STAT and PRG doubts
Message #3 Posted by Cristian Arezzini on 13 June 2011, 4:54 a.m.,
in response to message #2 by Paul Dale

Quote:

What did you expect the up and down arrows to do here?

They are in fact single stepping whatever program you have in memory & even if you don't have a program, they'll show step 000. The x^ operation has finished.


You're right. I was fooled by the fact that the top row said "linear" - other functions I usually use don't say anything on the top row - so I thought there was some choice to do, or something like that. The fact that I posted that around 5am didn't help! :) Sorry!

Quote:
You are probably getting caught by ENTER duplicating x into y and disabling stack lift. If you enter a number after ENTER, whatever in x is destroyed. As a fix RCL X should do what you want.

I see. I don't actually enter a number after, but execute RAN# (I want to multiply X by a random number, but keeping a copy on y). I didn't think about the stack lifting being disabled. I tried RCL X and it works. It works exactly like a DUP, right?

Thanks again, Cristian

                  
Re: Wp34s STAT and PRG doubts
Message #4 Posted by Paul Dale on 13 June 2011, 5:19 a.m.,
in response to message #3 by Cristian Arezzini

Quote:
I see. I don't actually enter a number after, but execute RAN# (I want to multiply X by a random number, but keeping a copy on y). I didn't think about the stack lifting being disabled. I tried RCL X and it works. It works exactly like a DUP, right?

Yes, RCL X is equivalent to DUP.

RAN# will replace the X register if stack lift is disabled. Plenty of other commands will as well.

Another sequence that should work and which is shorter is:

    RAN#
    RCL* Y

- Pauli

            
Single-stepping through WP34s programs
Message #5 Posted by Dieter on 13 June 2011, 4:09 p.m.,
in response to message #2 by Paul Dale

While we're on this topic: debugging 34s programs with the single-step key (down-arrow) always felt a bit ...strange for me. Now I think I know why:

While stepping through a program the 34s displays the previous step that has already been executed. So the numeric display shows the result after the step that is displayed in the upper line. In all other HPs I know of the display shows the next step that will be executed as soon as the SST-key is pressed. Makes more sense to me: on the 34s you never know what comes next. What do you think?

Dieter

                  
Re: Single-stepping through WP34s programs
Message #6 Posted by Walter B on 13 June 2011, 5:02 p.m.,
in response to message #5 by Dieter

Hallo Dieter, that's Pauli's domain :-)


[ Return to Index | Top of Index ]

Go back to the main exhibit hall