Post Reply 
Can I use long(er) variable names?
06-02-2020, 08:47 PM
Post: #1
Can I use long(er) variable names?
Howdy,

How do I use variable names like "FOCAL" or "RATIO"? When I tried this I get F*O*C*A*L?
Find all posts by this user
Quote this message in a reply
06-02-2020, 09:43 PM (This post was last modified: 06-02-2020 09:44 PM by victorvbc.)
Post: #2
RE: Can I use long(er) variable names?
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.
Find all posts by this user
Quote this message in a reply
06-02-2020, 10:09 PM
Post: #3
RE: Can I use long(er) variable names?
Thanks for you reply. That cleans things up a little.
Can I do this: RATIO = FOCAL/DIAMETER


David
Find all posts by this user
Quote this message in a reply
06-02-2020, 11:05 PM
Post: #4
RE: Can I use long(er) variable names?
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
Find all posts by this user
Quote this message in a reply
06-24-2020, 11:16 PM
Post: #5
RE: Can I use long(er) variable names?
Thanks to both of you. Both replies are helpful.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)