How can I access Tcl and Unix variables?
soar_library and default_wme_depth, for example, are defined as global variables, and all Soar files can be obtained through relative path names from the file path. On the Mac this is a bit trickier, but doable as well. Check out the TSI source code for examples. Unix environmental variables are also available through the “env” matrix of variables (e.g., $env(MANPATH). Advanced users can also set variables in their shells by hand or with init files. You should keep in mind that the Tcl scoping of variables is non-intuitive (to us, at least, at times), and it is a common problem in setting up paths and installation flags. This sort of problem is becoming a trend as its easy to overlook. All Soar global Tcl variables, such as $default, need to be defined with a Tcl “global” command when used in a script. When procedures call procedures that call scripts which call scripts …, your variable scope will change! If variables are not visible as you expect them to be, often the problem is tha