How about a structure like this:
Home
DIRs ... CASDIR
EXAMs ....Projs
EXAM.1
PROG ... VAR1 VAR2 VAR3 VAR4
|
Prg1 Prg2
Say, Prg1 uses VAR1 and VAR4, Prg2 uses also VAR1 plus VAR3
The variables are up in the PATH so they a used directly
when their names are not quoted eg. VAR1 instead of 'VAR1'
When you STOre into a variable "one floor up"
you can use something like this:
<< PUSH UPDIR 15 'VAR1' STO POP >>
where PUSH poushes you flags and current PATH to a variable
ENVSTACK in CASDIR, where they are POPped ...OR
<< PATH -> p << UPDIR 15 'VAR1' STO p EVAL >> >>
actually you could leave the PATH result in the stack
and do some manipulations to get it out of the way
and to bring it back to the top of stack for EVAL
Alternatively you could have the directories reversed:
Home
DIRs ... CASDIR
EXAMs ... Projs
EXAM.1
VARs ... Prg1 Prg2
|
VAR1 VAR2 VAR3 VAR4
Now recalling goes like this:
<< { VARs VAR1 } RCL >>
STOring:
<< VARs 15 'VAR1' STO UPDIR >>
You could have other variations
like using variables from below, same level and UPDIR
anyway anything higher on your PATH
will get executed by a simple reference with no quotas
whether the name refers to a program or a variable
Variable 'execution' will just recall the contents
that is, if the 'name' contains a value
string, complex number, matrix, algebraic, list, library
BUT
if the contents are: a program, CODE, etc, it will be run
it's just like using the command line and pressing [ENTER]
more..?