Post Reply 
WP34S - f SLV used with user selectable variables
05-06-2018, 08:47 AM (This post was last modified: 05-06-2018 09:58 PM by Dieter.)
Post: #9
RE: WP34S - f SLV used with user selectable variables
(05-05-2018 07:35 PM)gomefun2 Wrote:  1) How do I know what letters correspond to what number in the x->alpha step (what page in the manual is the relationship between the number and the alpha symbol)? (how does 65.026 > A?, I don't see this anywhere in the manual).

Appendix E. But you don't need that table for this purpose – it's just simple ASCII: A=65 ... Z=90, a=97...z=122. Yes, the table uses hexidecimal notation, so "41" for "A" means 4*16+1 = 65 decimal.

(05-05-2018 07:35 PM)gomefun2 Wrote:  2) How does the loop know to stop after 26 characters? (EDIT: I think I figured this one out ISG>cccccc.fffii where ii = 1 because it is not otherwise specified.) this compares R00 with fff, fff is incremented by ii each iteration.

Right. It's the same as on your 35s which you should be familiar with. And the same as on most HPs since the late Seventies. Essentially this sets up a for-next loop: for i = 1 to 26 here is 1,026. You can even set a step size in the 4th and 5th decimal. So 1,01502 counts 1, 3, 5, ... 13, 15.

(05-05-2018 07:35 PM)gomefun2 Wrote:  3) How do you combine multiple letters such as "Pr", or "Xr", instead of just one character? (do you just add another character without using CLalpha)?

In Alpha mode usually one character is one program line. But there is a way to combine up to three characters in one line: press f Alpha twice. In program mode this will show  α' and now you can enter the two characters for "=?" in a single line. Otherwise it's one character per line. In any case each Alpha entry is appended to the existing one. So two three-character-lines give a six-character string in Alpha.

(05-05-2018 07:35 PM)gomefun2 Wrote:  EDIT: new Question 4) is #000 used as a short integer format? so it saves memory to use this for any number between 0 and 255?

Yes. These short integers are faster and require less memory than individual digits. Unlike for instance the HP41 or HP35s the WP34s cannot put a complete number like 1,026 or 4711,0815 in a single line. But by means of short integers and the comma-shifting commands SDR and SLR there is a way to come close in many cases.

(05-05-2018 07:35 PM)gomefun2 Wrote:  EDIT: new Question 5) Is there any way to store a single number in the form of 656667686970. such that the program will move read two characters each time it loops (ABCDEF), and translate it into different characters.

On a programmable calculator there always is a way. Of course this can be programmed. For instance this way: turn the 656667686970 into 0,656667686970 and then multiply by 100 to get the first character, then take the fractional part and continue:

Code:
LBL 99
CLα
EXPT
ODD?
DEC X
RCL L
SDR→Y
x=0?
RTN
x→α
FP
SDL 002
BACK 005

656667686970  XEQ 99  => "ABCDEF"
Remember, even in SP mode the 34s supports up to 16 digits.

In the same manner you could set up a routine that prompts for A, B, C, D, E and F, one after another.

Edit: another option is using the αSTO and αRCL commands. Here a string is represented as a number in base 256 (!). So "ABCDE" is stored as 280284578885. Try it: enter this number in X, clear Alpha and recall the number with αRCL X (simply press f RCL).

(05-05-2018 07:35 PM)gomefun2 Wrote:  This way I could use a similar loop as the one you have there, but I would be able to get characters in any order (not just A, B, C, but X, M, R, etc?) This would be like a list... the only guess I have how to do this would be to set R90 to R99 as the list and store the corresponding numbers in those registries. But does this calculator have a better way to do this?

There always is a better way. But this requires detailled and precise information on what exactly (!) you want to achieve.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: WP34S - f SLV used with user selectable variables - Dieter - 05-06-2018 08:47 AM



User(s) browsing this thread: 1 Guest(s)