Post Reply 
WP34S - f SLV used with user selectable variables
05-05-2018, 07:35 PM (This post was last modified: 05-05-2018 11:24 PM by gomefun2.)
Post: #8
RE: WP34S - f SLV used with user selectable variables
(05-04-2018 12:56 PM)Dieter Wrote:  
(05-03-2018 10:02 PM)gomefun2 Wrote:  There are a lot of problems I solve that require an excess of 100 variables. I programmed an Excel spreadsheet (in VBA) to calculate pressure drop (Beggs Brill/Modified Hagedorn and Brown Method (With Griffith Correlation)) and I remember counting more than 100 variables and 17 sub-functions.

I'd say that a calculator may not be the right tool for this, and you should better stick to Excel or another program that suits this application even better.

If you still want to use the 34s for this, here is a much shorter input routine that does not require separate prompts for each and every single variable (and thus 26x5 = 130 steps for A...Z):

Code:
#026
SDR 003
INC X
STO 00
CLα
#064
RCL+00
x→α
α"=?"
R↓
RCL→00
PROMPT
STO→00
ISG 00
BACK 010

Note: if you're not yet familiar with the 34s, the first three lines are just a fancy way of writing 1,026. ;-)
The routine may be updated for more than 26 variables, for instance by calling them ...X, Y, Z, A2, B2, C2, ...
Or switch to lower case: X, Y, Z, a, b, c, ...

Dieter

I got your code to work, and I have 3 questions:

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). EDIT: I found using the alpha->x command will give me the codes for the letters, but still where is the complete list for this? EDIT 2) are the codes in "Appendix E: Character Sets"? Do I have to convert those base 16 numbers to base 10 to use them for the x->alpha command? I'm not a computer engineer so I never even really learned base 16, I'm just guessing here lol.

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.

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)?

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?

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. 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?
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 - gomefun2 - 05-05-2018 07:35 PM



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