The Museum of HP Calculators

HP Forum Archive 13

[ Return to Index | Top of Index ]

HP32->HP48
Message #1 Posted by Pierre Brial on 11 Oct 2003, 6:44 a.m.

Hello,

I have some trouble to translate HP-32sII programs to an HP-48GX just borrowed to me. Well, the RPN calculation part is OK. But what is the simplest way to ask to the user a value for a variable ?

With the HP-32 it is very easy. If you want to ask a value for variables A and B, just type in your program :

INPUT A

INPUT B

Just 6 keystrokes, very easy and straightforward.

But then if you want to do the same with HP48, according to the manual, you need many many keystrokes, with INPUT, OBJ->, and a lot of -> "" {} :: and so on...

But may be I didn't understand the trick ?

Any help ?

Pierre Brial

      
Re: HP32->HP48
Message #2 Posted by James M. Prange on 11 Oct 2003, 7:31 a.m.,
in response to message #1 by Pierre Brial

Yes, no doubt it is a lot more complicated on the 48 series, but I suppose that that's because you can do a lot more things with the INPUT command on the 48.

For what you want to do, start with:

"Enter a value"    @ Tell the user what to do.

"" @ An empty string for the command line.

INPUT @ After the user types in a value and presses ENTER, the string will end up on level 1.

OBJ\-> @ Assuming that a number was entered, the string will be changed to a number.

@ If you want to store it in a variable:

'VarName' @ Whatever name you want.

STO @ Store it.

Note that because the 48 isn't limited to 4 stack levels, you might not need to store the value; just use the stack.

Of course, there are more options that you can use with INPUT, but you don't *have* to use them.

Also consider the PROMPT command for what you're doing.

Regards,
James

            
Re: HP32->HP48
Message #3 Posted by Pierre Brial on 11 Oct 2003, 1:02 p.m.,
in response to message #2 by James M. Prange

Thank you James for your clear answer.

As to the HP-48, I balance between love and hatred.

Love for its astounding capability to handle mathematical objects, like matrix, sums, equations. I usually don't like to do matrix calculation, but with this calc it is a true pleasure.

Hatred for programing. Before then I've done a lot of programs in RPN for HP-41, HP-32sII, algebric for TI-59, Basic and machine language with Sharps, so I wrongly believed I could handle easily any other calcs. But Hp-48 is hard nut. Very powerfull indeed, but there is few simple solutions for simple problems, and it is far from intuitive.

I understand better why long-time users of HP-41, 42, 15 prefer to keep their good old calcs.

But on the other hand, there is many many user of the HP-48 and you can find a lot of programs on the net. So some people do really succeed to program it.

I suppose I'm too much rusted with old programming way....

All the best

Pierre


[ Return to Index | Top of Index ]

Go back to the main exhibit hall