Post Reply 
Bug? accessing LOCAL var in shared scope
11-24-2015, 07:49 PM
Post: #9
RE: Bug? accessing LOCAL var in shared scope
Hello,

Yes, the problem, as explained to some extend by Han is that the CAS is not local or program aware.

To access a local (as is function local), or program global variable (exported or local), the CAS would need to know what program/function is running. Which it does not because the Home/Cas interconnection is not 'that great'.

The result is that you can access from the CAS a program exported variable (because the CAS can find it), although it is dangerous because if you have 2 programs that export a variable with the same name (remember, they are still 2 variables in this case), then the CAS might pick any of them (actually, the one from the first program in the list...) but can not find a function local or program non exported variable.

Now, in order to try to 'hide' the problem as much as possible for 'non advanced' programs, when you call a cas function from a HPPL function, if they are any function local variables in the arguements, they will be replaced by their values, but this does not happen with program globals (maybe it should)...

One of the issue is that HPPL never knows when the cas need symbolic data or value data when it is called, this makes it fairly hard to know/guess what the user wants to do.

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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Bug? accessing LOCAL var in shared scope - cyrille de brébisson - 11-24-2015 07:49 PM



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