The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

WP-34S: # constant in exponent
Message #1 Posted by Marcel Samek on 6 July 2013, 10:22 a.m.

In debugging a program, I found that I had used:

1
EEX
# nn

It did not do what I expected. Is there a specific reason why # constants cannot be used for exponents, or did it just not make it into the design?

      
Re: WP-34S: # constant in exponent
Message #2 Posted by Walter B on 6 July 2013, 12:24 p.m.,
in response to message #1 by Marcel Samek

I can guess why, but that question goes to Pauli.

d:-)

      
Re: WP-34S: # constant in exponent
Message #3 Posted by Dieter on 6 July 2013, 1:20 p.m.,
in response to message #1 by Marcel Samek

Marcel,

the #nnn shortcut enters an integer and quits digit entry before and after the command. Thus it cannot be combined with regular digit entry. So the sequence...

 1
 EEX
#123
...does not return 1E123. Instead, it enters two different values: "1 EEX" equals 1 and #123 is, well, 123. So you will end up with 1 in Y and 123 in X. That's the way it is supposed to work. And it is consistent, since you cannot use...
 1
#234
...to enter 1234 either. Or even think of this one:
#123
#456
Of course this will not produce a six-digit integer like 123456. ;-)

By the way, your example can simply be coded as

 #001
 SDR nn
That's even shorter.

Dieter

      
Re: WP-34S: # constant in exponent
Message #4 Posted by Paul Dale on 6 July 2013, 8:33 p.m.,
in response to message #1 by Marcel Samek

Dieter got it right.

Consider EEX [pi]. What should this do?

The # nnn commands are constants. They terminate command line input and raise the stack usually. The are not an extension of keyboard digit input.

- Pauli


[ Return to Index | Top of Index ]

Go back to the main exhibit hall