Home Contents Index Summary Previous Next

B.5 Hooks for loading files

All loading of source-files is achieved by load_files/2. The hook prolog_load_file/2 can be used to load Prolog code from non-files or even load entirely different information, such as foreign files.

user:prolog_load_file(+Spec, +Options)
Load a single object. If this call succeeds, load_files/2 assumes the action has been taken care of. This hook is only called if Options does not contain the stream(Input) option.

The library(http_load) provides an example, loading Prolog sources directly from an HTTP server.