next up previous contents index
Next: 3.10 The Compiler Up: 3.9 Compiling, Consulting, and Previous: 3.9 Compiling, Consulting, and   Contents   Index

The multifile directive

The default action upon loading a file or module is to delete all previous byte-code for predicates defined in the file. If this is not the desired behavior, the user may add to the file a declaration
:- multifile Predicate_List .
where Predicate_List is a list of predicates in functor/arity form. The effect of this declaration is to delete only those clauses of predicate/arity that were defined in the file itself. Issues to remember when using multifile in XSB Version 3.0 are:

Other predicates for loading files are ensure_loaded/[1,2].

ensure_loaded(+FileName)

This predicate checks to see whether the object file for FileName is newer than the source code and header files for FileName, and compiles FileName if not. If FileName is loaded into memory, ensure_loaded/1 does not reload it, unlike consult/1 which will always reload
ensure_loaded/2 is documented in Section 6.13.1.


next up previous contents index
Next: 3.10 The Compiler Up: 3.9 Compiling, Consulting, and Previous: 3.9 Compiling, Consulting, and   Contents   Index
Terrance Swift 2007-10-05