Node:Loading the Prolog code, Previous:Initializing the Prolog engine, Up:How to use the interface



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 clauses of user:file_search_path/2 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))").

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

That is, you can use the query PrologQueryCutFail("load_files(vbsp(myfile))") to load the file myfile if it is located in the same directory as vbsp.dll.