loads an already compiled module to the node
INCLUDE 'prolib.h' load("demo")
load(ModuleName)(i)
string(ModuleName) (i) Name of Module to be loaded
This adds the compiled module onto the current node. ModuleName is the name specified by
the MODULE keyword in the associated source. If the module is already loaded the call will
succeed immediately. Otherwise the system adds an '.lkd' ending to it and starts a search for a
appropriate file. The Module should be contained either in the current directory, the library
directory, or the binary directory. If it cannot be found, the load fails.
If you call a predicate via
call
(),
xcall
() or
exec
(), you must
ensure that the code is already present. An easy way to do so would be issuing the call with a
precede load predicate. Please see the example below.
To load code on each node of the system, you may use the
load_all
() predicate.
NOTE: You do not need this predicate if you use a compiled call to an external predicate. This
will be done by the system.
xcall(( load(demo), start_demo )). % load is needed load(demo), call(start_demo). % load is needed IMPORT demo :- start_demo. start_demo. % load is NOT needed!
No runtime errors.
prolog-process, client-server, object
load_all , reload , consult , compile , load_compiler