HP Forums
HP 50g Saving variable - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: HP 50g Saving variable (/thread-6337.html)



HP 50g Saving variable - Kjell67 - 06-01-2016 10:13 PM

Hi,
I have some problem with saving a variable on my HP 50g. Usually i press "Variable name"+enter+STO.
But now it says Error:Too Few Arguments.
Until now i never had problems with saving variable names. Please see enclosed picture.


RE: HP 50g Saving variable - cruff - 06-01-2016 10:54 PM

(06-01-2016 10:13 PM)Kjell67 Wrote:  Usually i press "Variable name"+enter+STO.

Is there a value on the stack to be stored into "Variable name"?


RE: HP 50g Saving variable - cyrille de brébisson - 06-02-2016 05:15 AM

Hello,

Is your HP50 in RPN mode?
Do you have something on stack level 2 before pressing STO?
Is what you have on level 2 not a copy of what you have on level 1 (the name of the variable twice)?

Cyrille


RE: HP 50g Saving variable - wojtek - 06-02-2016 06:27 AM

(06-02-2016 05:15 AM)cyrille de brébisson Wrote:  Hello,
Is your HP50 in RPN mode?
Do you have something on stack level 2 before pressing STO?
Is what you have on level 2 not a copy of what you have on level 1 (the name of the variable twice)?
Cyrille

It's in RPN, the message on the LCD says that argument is missing.
But, if I put a name twice on the stack, for example:
'XXX'
'XXX'
and then press STO an error "circular reference" is displayed.
If I enter on the stack
'YYY'
'XXX'
and then press STO, a name 'YYY' will be stored in variable XXX.
The question is: why "circular reference"? Is a value evaluated before storing? Probably not as:
'SIN(30)'
'XX'
STO
saves 'SIN(30)' in variable XX and not just 0.5.


RE: HP 50g Saving variable - Massimo Gnerucci - 06-02-2016 07:01 AM

(06-02-2016 05:15 AM)cyrille de brébisson Wrote:  Do you have something on stack level 2 before pressing STO?

From what I see this should be the problem.


RE: HP 50g Saving variable - Thomas Radtke - 06-02-2016 02:01 PM

Others have answered already, but I'd like to add ...

(06-01-2016 10:13 PM)Kjell67 Wrote:  Until now i never had problems with saving variable names.
You cannot just save a variable name, at least not this way. You need to assign something to it to have it created.


RE: HP 50g Saving variable - Kjell67 - 06-02-2016 02:32 PM

Ah..so simple. You have right, I just needed to have value in stak in addition to the variable name. Then it worked. Thank you so much Smile


RE: HP 50g Saving variable - Claudio L. - 06-03-2016 06:36 PM

(06-02-2016 06:27 AM)wojtek Wrote:  The question is: why "circular reference"? Is a value evaluated before storing?

Not when storing, but when running in a program or in a symbolic expression. I think the circular reference check was moved to STO to avoid having to check for it on each evaluation. Think of a function you are trying to evaluate hundreds of times for plotting. It's much more efficient to ensure only once there's no circular reference when STOring it than having to check every single time.