Bug in WP34S?



Post: #5

Hi all,

I am using WP34S emulator version 3.1, Build date June 2, 2012, Svn revision 3103. I wrote a program that compares the value of the X register in the stack with values in global registers. The tests (especially x<=? -> 22 and the like) did not return the expected logical result. Replacing indirect testing with old fashioned (HP-41C style) comparison made the program work as expected.

Has this bug been caught and corrected in subsequent builds?

Namir


Post: #6

Hi Namir,

Please be a little bit more specific: What exactly did you try which doesn't work as expected?

TIA


Post: #7

Walter,

Here is an example. The 41-style code that works is:

RCL 22
RCL 11
x<=? Y
GTO 15
...

When memory register 11 has a value less than or equal to the value in memory register 22, the program executes the GTO 15 command.

When I translated it to:

RCL 11
x<=?-> 22
GTO 15
...

It won't work. The program ignores GTO 15 and moves on to the next commands. Am I using the new test in reverse? Should it be?

RCL 22
x<=?-> 11
GTO 15
...

This "bug" appeared in several places in the program. When I translated the new stack-to-register tests to equivalent X/Y stack registers tests, the program worked.

I would like to use the new WP34S features. My hope is that the WP34S program in question can make it to the web-based HP Solve newsletter.

Namir


Edited: 5 Aug 2012, 6:10 p.m.


Post: #8

I don't think you need the indirection. The code should be:

RCL 11
x[<=]? 22
GTO 15

The conditional is looking into the register already. Adding indirection takes it to a completely different register based on the contents of register 22.


- Pauli

Post: #9

Any chance of an example of this failure? I've tried a few simple tests and there doesn't seem to be anything wrong. Fro example:

Reg  Value
22 16
16 44
X 35

x[<=]->22 gives true.

Change X to 66 and repeat gives false.


All indirection is handled in a single place in the code, a bug here will manifest in other indirections in all likelihood. So I'd rather like to get this fixed.


- Pauli


Post: #10

OK, I found what I was doing wrong. After I select a test, I need to click the ENTER key and then enter the register number. I was clicking the right-pointing arrow key on the top row and then entering a register number. Bad move!

Sorry for the false alarm. I am going back to my code and edit it to correctly use this feature.

Merci!!!

Namir


Forum Jump: