create_module(+atom_name, +list_atom_options)

This predicate is used to create a new empty module in the clausebase. The first argument is the name of the new module. How the module is created can be determined by the list of options, the available options are:

see also: active_module/1 check_singleton/1 close_all_modules/0 close_module/1 consult/0 consult/1 consult/3 create_module/1 ensure_loaded/1 include/1 module/3 module_name/2 modules open_module/0 open_module/1 open_module/3 open_module_search/3 open_standard_module/2 save_module/1 save_module/2 save_module/3 set_active_module/0 set_active_module/1 this_module/3

Examples
create_module(m23, [read, not_active]). attempt to create a new module with the name m23, the open-mode of the module is 'read' and the new module will not become the active module of the clausebase

 

Exceptions
the argument is not an atom an instantiation_error exception is thrown
invalid open-option Arg specified a domain_error(consult_option, Arg) exception is thrown
a module with the same Name does already exist an existence_error(module, Name) exception is thrown

 

 

info@trinc-prolog.com