create_module(+atom_name)

This predicate is used to create a new empty module in the clausebase. The argument is the name of the new module, the new module becomes the new current active module of the clausebase. The open-mode of the new module is readwrite, so the module can be saved. With create_module/2 is it possible to specify other options.

see also: active_module/1 check_singleton/1 close_all_modules/0 close_module/1 consult/0 consult/1 consult/3 create_module/2 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). creates a module with the name m23

 

Exceptions
the argument is not an atom an instantiation_error exception is thrown
a module with the same Name does already exist an existence_error(module, Name) exception is thrown

 

 

info@trinc-prolog.com