Re: HP50g variables Message #2 Posted by Gerson W. Barbosa on 1 Jan 2007, 8:21 a.m., in response to message #1 by Hal Bitton
Quote:
Is there no way to condition a variable to behave like a storage register in the old RPN models, where a new value could be overwritten in with 2 keystrokes?
There is a way! Quoting from the HP-28S Owner's Manual, page 300:
--------------------------------------------------------------------------------
Registers Versus Variables
Fixed-stack calculators can deal efficiently only with real, floating-point numbers for which the fixed, seven-byte register structure of the stack and numbered data register memory is suitable (the HP-41 introduced a primitive alpha data object constrained to seven-byte format). The HP-28S replaces numbered data registers with named variables. Variables, in addition to having a flexible structure so that they can accomodate different object types, have names that can help you remember their contents more readily than can register numbers.
If you want to duplicate numbered registers on the HP-28S, you can use a vector:
{ 50 } 0 CON 'REG' STO
creates a vector with 50 elements initialized to 0;
<< 'REG' SWAP GET >> 'NRCL' STO
creates a program NRCL that recalls the nth element from the vector, where n is a number in level 1;
<< 'REG' SWAP ROT PUT >> 'NSTO' STO
creates the analogous store program NSTO.
--------------------------------------------------------------------------------
This also applies to the HP-50G. I would suggest you created these programs in the HOME directory so they can be accessed from all inner directories. You can also add NSTO and NRCL to your custom directory or create it, in case you haven't done it yet:
{ NSTO NRCL } 'CST' STO
Now press the white shift key then the MODE/H key. You'll have NSTO and NRCL soft keys. Let's say you want to store the number in level 1 in register 9. All you have to do is pressing two keys:
9 A
(assuming your CST variable is {NSTO NRCL})
Likewise, to recall register 9, only two keystrokes are needed:
9 B
Of course only registers 1 through 9 can be overwritten with only two keystrokes.
Enjoy your Christmas gift!
Best regards,
Gerson.
--------------
Contrary to what I thought, saving the programs in the HOME directory is not enough to assure they can be called from inner directories. It appears NRCL may work if it is changed to
<< REG SWAP GET >> 'NRCL' STO
Actually, this is a simulation of the numbered registers that are common in RPN calculators. I remembered I missed the convenience of numbered registers when I started using the HP-28S, until I finished reading the manual...
Edited: 1 Jan 2007, 12:49 p.m.
|