Loading the Prolog Code

Prolog code (source or object code) can be loaded by submitting normal Prolog load predicates as queries. Note that SICStus uses slashes / in file names where Windows uses backslash \. Example:

     PrologQueryCutFail("load_files('d:/xxx/myfile')")
     

To facilitate the location of Prolog files, two file search paths are predefined:

app
identifies the directory path of the Visual Basic project or the applications executable.

That is, you can load the file myfile located in the same directory as the project/executable, issuing the query:

          PrologQueryCutFail("load_files(app(myfile))")
          

right in cope with initial backslash

vbsp
identifies the directory path of the vbsp.dll file.

That is, you can use the following query to load the file myfile if it is located in the same directory as vbsp.dll:

          PrologQueryCutFail("load_files(vbsp(myfile))")
          

Note that, as of SICStus 3.10, you can use the application and runtime file search paths to achieve a similar effect.