cancel
Showing results for 
Search instead for 
Did you mean: 
JKova
Level 4
138 92 2 5
Message 1 of 5
724
Flag Post

Solved!

Is there any solutiob to write a Global name from string

HP Recommended
HP 50g
Hello HP Community once again , but now I have different type of problem.
I want to write a Global Variable name from elements I added to string , or as example from that string that I get from these elements , as example i write a
"AS" and I press space or enter ( in RPN mode of course ) and i write "TI" , when I hit the plus ( + ) key it shows me something like "ASTI" , so I want to write as example something in form of Global variable name which gives me number added to a letter i want to save , as example I want to write 3A , but 3 as number calculation ( as example when i hit 1 2 + ) and that joins with letter A , an the exit form would be '3A' , not "3A" , please reply if you have a answer
0 Kudos
Tags (1)
4 REPLIES 4
JKova
Author
Level 4
138 92 2 5
Message 2 of 5
Flag Post
HP Recommended

Hi , again , me , let me clarify , i want to know that does it exist any way to "convert" string type of data to Global variable name in HP 50g graphing calculator , that is all i want .

If you have a answer pleasew reply on my question , i will be very greatefull to You .

:generic: 

 

0 Kudos
Tim_Wessman
Level 8
Level 8
747 744 121 187
Message 3 of 5
Flag Post
HP Recommended

The command you want is S~N

 

It is in library 256, so that has to be attached once first. Here's from the AUR:

 

"

Section 1 - Introduction

Built into the hp49+/hp48gII is a set of functions not accessible to the user by default. These functions are in a library that contains low level development tools mainly designed for use in developing System RPL and assembly programs.

In order to enable this library, you must attach it with the command 256 ATTACH or by setting flag ñ86. When the library is attached after the next warmstart (or reset), it appears in the APPS menu. You may reset the calculator by pressing  [ON] and [F3] at the same time."

TW

Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
Jan_D
Level 6
305 297 32 76
Message 4 of 5
Flag Post
HP Recommended

The command OBJ→  does the job for me.

Not for "3A" though, because 3A is not an allowed variable name, since it begins with a number.

But OBJ→ converts "A3" into 'A3'

Tags (1)
Jan_D
Level 6
305 297 32 76
Message 5 of 5
Flag Post
HP Recommended

Addition.

 

The method I just suggested has a disadvantage, because it only works this way when the variable A3 has not yet been defined and not yet contains a concrete value.

 

Suppose A3 has already been defined to be 3.5, then

"A3"  OBJ→ returns 3.5 instead of 'A3' and this is probably not what you want.

 

In this situation we have to replace "A3"by

"'A3'"

Note the two extra ticks.

For some reason one tick is already enough for our purpose and we can write:

"'A3"

 So instead of "A3"  OBJ→ we have to write:

"A3"  "'" SWAP + OBJ→

 The need of this extra code in this situation is probably the reason why the method Tim suggested may be easier.

 

See also:

https://h30434.www3.hp.com/t5/Calculators/HP50G-Convert-string-to-algebraic-type-object/td-p/5086297

 

 

 

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation