HP Forums

Full Version: location of variable, Home or CAS?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible, within CAS, to identify the location of a variable, whether Home or CAS?

e.g for both a:=3 (Home) and a=3 (CAS), type() gives me INT for a, and IDENT for 'a'.

I know I can find them in separate areas in the Memory Manager (shift B), but I'd like to do it from a program.

I'd like to enhance the little varslist utility — posted here by @dae — to indicate the location, to speed up deleting it.

Of course, I could use purge(), and if it fails I know it's in Home, but…

thanks!
Hello,

Sorry, I never thought of that!!!!

Symbols can be in LOTS of places in the system (see order of resolution)...

1) Local variables (CAS or PPL). Note that when calling the CAS from PPL, all the current PPL Local variables are accessible from the CAS (normally)
2) Current Program globals (variables declared out of the scope of functions)
3) App variables (AVars)
4) App build in variables (Xmax, Xmin...)
5) Other programs globals (exported, or not if fully qualified)...
6) Other apps globals (AVars and build in)...
7) Home and CAS global variables (including home build in: A-Z, Z0-Z9 + HVars)

Kind of messy! But they all have their roles...

Cyrille
thanks Cyrille! I was considering only section 7, above, so thanks for the reminder Smile
Reference URL's