Post Reply 
Variables in a Program(A,B)
05-16-2021, 05:33 AM (This post was last modified: 05-16-2021 06:10 AM by C.Ret.)
Post: #3
RE: Variables in a Program(A,B)
Please also note that in your program, A et B are the only local variables, all the other affectations are modifying the contents of the global variables C, D and E. You have to use keyword LOCAL to design temporary variable only existing in the program environment.

Independently, concerning variables you have to daily use in different units, I greatly recommend you using the UNITS menu facilities of the HP Prime. The units of each value will be indicate in the stack avoiding a lot of mistake or worries !

To save variable with units, we have to use a different name than the reserve global variable names (the values with units can't be store in REAL or COMPLEX global variable slots). With the actual version of the software, it is easy to create user variable of versatile name, just touch (OK) when prompt for creating a new custom user variable name.

Here is a short example of what can be done with custom user variable a and b of respective value 2_ft and 4_inch :


As you can see, any result is indicated with the corresponding unit.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Variables in a Program(A,B) - matalog - 05-15-2021, 08:35 PM
RE: Variables in a Program(A,B) - matalog - 05-15-2021, 09:04 PM
RE: Variables in a Program(A,B) - C.Ret - 05-16-2021 05:33 AM

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