HP Forums

Full Version: HP 50g Saving variable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
(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"?
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
(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.
(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.
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.
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
(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.
Reference URL's