[ Predicate Database and Compiler | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

ensure_loaded(++Files)

Compile the specified Files if necessary.
Files
Atom, string, library(Atom) or a list thereof.

Description

Compiles the specified files or libraries if they haven't been compiled yet or if they have been modified since the last compilation. The file name expansion rules are the same as for compile/1, except that it tries to load a precompiled file (with the eclipse_object_suffix) before looking for source files.

Modes and Determinism

Modules

This predicate is sensitive to its module context (tool predicate, see @/2).

Exceptions

(4) instantiation fault
Files is not instantiated.
(5) type error
File is instantiated but not to a (list of) files.

Examples

    ensure_loaded(prog).
    ensure_loaded('dir/file').
    ensure_loaded([file1, 'file2.pl']).
    ensure_loaded(library(lists)).

See Also

. / 2, compile / 1, compile / 2, current_compiled_file / 3, fcompile : fcompile / 1, get_flag / 2