HP Forums
Can I use long(er) variable names? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Can I use long(er) variable names? (/thread-15119.html)



Can I use long(er) variable names? - davidjackson0513 - 06-02-2020 08:47 PM

Howdy,

How do I use variable names like "FOCAL" or "RATIO"? When I tried this I get F*O*C*A*L?


RE: Can I use long(er) variable names? - victorvbc - 06-02-2020 09:43 PM

Hi.

I assume you want to create user variables in HOME mode. Use something like this:

Code:
3.14â–¶RATIO

Then there will be a message box asking if you want to create said variable.

If you try to use these all caps var names without declaring first, the Prime interprets it as implied multiplication.


RE: Can I use long(er) variable names? - davidjackson0513 - 06-02-2020 10:09 PM

Thanks for you reply. That cleans things up a little.
Can I do this: RATIO = FOCAL/DIAMETER


David


RE: Can I use long(er) variable names? - pinkman - 06-02-2020 11:05 PM

Once you created you variables FOCAL and DIAMETER:

RATIO:=FOCAL/DIAMETER will define a variable and assign a value for it, without being updated each time you change FOCAL or DIAMETER.
You can create a function (shift Define) named RATIO and give the expression FOCAL/DIAMETER in the function field. Then uncheck the two checkboxes and now in home you can use RATIO, it will be updated each time you modify FOCAL or DIAMETER.

If you need to solve one of the three values knowing two of them, delete your previous RATIO function, create a variable named RATIO, then use the Solver App with the expression RATIO=FOCAL/DIAMETER


RE: Can I use long(er) variable names? - davidjackson0513 - 06-24-2020 11:16 PM

Thanks to both of you. Both replies are helpful.