Prime crashes while deleting Home vars
|
09-28-2015, 07:21 AM
Post: #10
|
|||
|
|||
RE: Prime crashes while deleting Home vars
Hello,
Ho, I think that I am going to enjoy responding to this post :-) > The primes handling of variables is odd at best, demonic at worst. The first thing that comes to mind is: MawHAHAHAH! That being said, Prime is actually pretty logical, but it can take a while to remember ALL the actors in the market here so as not to shoot yourself int he foot. Prime does try to cater to all, and this, in some ways, is what is causing the issue here. There is just too much. Let us list ALL the types of variables available in Prime (setting aside the fully qualified forms for the moment), in order of precedence. 1) Current function call local variables. Gives access to ALL the LOCAL variables declared PRIOR to the current instruction in ALL the program blocks above us in the execution hierarchy (of this function), with name overlap if/as needed. This includes the function parameters. 2) build in home variables such as A or Z1 3) Current function's program global variables (can be export or not) 4.1) Current app build in variable/functions 4.2) Current app dynamic variables/functions (for example geometry 'variables', spreadsheet cells)... 4.3) Current app user variables (HVars) 4.4) Current app program exported variables 5) Program exported variables (all programs, scanned in the display order) 6) All BASE applications 'special' build ins that can be used without full qualification (F1 for example) 7) Home user variables 8) CAS variables and functions Each of these 11 types of variables have a good reason to exist in the calculator, for various types of users, in various situations. Of course, when you start mixing and matching the use with variables named in the same way... It looks devilish! So, in your case, you created 2 JOE variables. One in a program, one in the home. you do have 2 variables (which is why it shows up twice). HOWEVER, since the program variable takes precedence OVER the home variable, you can ONLY access the program one (unless you use the HVars("name") syntax, which you can use to verify what I am saying). As you can see, pretty simple/straightforward... But I guess any sufficiently advanced order of precedence is indistinguishable from evil. (Note, I, myself, had to look up the order!) Regards, Cyrille Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)