Re: Directory Structure,if any, on the Prime Message #3 Posted by Joe Horn on 8 Oct 2013, 12:11 a.m., in response to message #2 by Han
Quote: Variables within an app live within that app's "namespace." That is, if I am running App1 and create a variable named 'myvar' then the full name of that variable is actually App1.myvar
While using App2, I can still access myvar from App1 using App1.myvar and at the same time have a "different" myvar for use within App2 -- except its full name would of course be App2.myvar instead. Within App2, though, I may leave off the prefix and just type myvar and the calculator knows to use the myvar from within App2.
Not really. Each app does have its own built-in "app vars", which work as you describe, but user-created variables do not work that way at all. They are global, and cannot use app prefixes.
Example: In the Function app, do VAR1:=1 in Home, and var2:=2 in CAS. Then go into the Advanced Graphing app, Home view. VAR1 still brings up 1, and var2 still brings up 2. In fact they return those values in all apps. Furthermore, Function.VAR1 and Function.var2 give Syntax Error, no matter what app you're in. Finally, changing their values in any app changes it for all apps; they can't have different values in different apps.
Therefore "user variables" (created in Home, and listed in Vars, User; and in Shift Mem, User Variables, up-cursor) and "CAS variables" (created in CAS, and listed in Vars, CAS; and in Shift Mem, CAS Vars) are both global, and not limited in scope to the app in which they were created.
Note: In the example above, VAR1 was spelled using uppercase letters, and var2 using lowercase letters, only because that's the default ALPHA case in Home and CAS respectively. However, both environments allow their vars to be named with letters in upper- and/or lowercase; they don't care. Using upper- and lowercase for Home and CAS respectively is only a helpful convention, not a requirement.
-Joe-
|