Why can't CIAO find my S-Lang scripts?
sherpa> () = evalfile("lc_clean.sl") Error: cannot find or unable to open file as requested : lc_clean.sl
The directories CIAO searches for S-Lang scripts are determined by three environment variables, in the following order:
- $PWD (the current directory)
- $SLANG_SCRIPT_PATH (set to "$ASCDS_INSTALL/share/slsh/local-packages:$ASCDS_INSTALL/contrib/share/slsh/local-packages" by default)
- $ASCDS_WORK_PATH (set to /tmp by default)
$PWD is simply the current working directory, while the other two are colon-separated lists of directories that are initialized by ciao.*sh. In order for a CIAO application (e.g. ChIPS or Sherpa) to find a S-Lang script, it must be located in a directory listed in one of these variables. (The exception to this rule is when the argument to evalfile contains an absolute path.)
Note that, by default, the above search path does not apply in slsh scripts. To change the search path used in an slsh script, use the function set_slang_load_path.