logtalk_load/2
logtalk_load(Entity, Options) logtalk_load(Entities, Options) logtalk_load(Metafile, Options)Compiles to disk and then loads to memory an entity, a list of entities (objects, protocols or categories), or a source metafile using a list of options. The Logtalk file name extension (by default,
.lgt
for entity source files and.mlgt
for source metafiles) should be omitted. Note that the first argument is a list of entity/file names, not file paths. In other words, the files must exist in the current working directory.For a description of the available compiler options, please consult the User Manual.
Note that only the errors related to problems in the predicate arguments are listed below. Other exceptions may be thrown by the compiler if any of the loaded entities contains syntax errors.
logtalk_load(@atom_or_atom_list, @list)
- Entity is a variable:
instantiation_error
- Entities is a variable or a list with an element which is a variable:
instantiation_error
- Entities is neither a variable nor an atom nor a proper list:
type_error(list, Entities)
- An element Entity of the Entities list is neither a variable nor an atom:
type_error(atom, Entity)
- Entity or an element Entity of the Entities list does not exist in the current working directory:
existence_error(entity, Entity)
- Options is a variable:
instantiation_error
- Options is neither a variable nor a proper list:
type_error(list, Options)
- An element Option of the Options list is not valid:
type_error(compiler_option, Option)
| ?- logtalk_load(list, []). | ?- logtalk_load([listp, list], [xml(off), plredf(warning)]).