This predicate sets the active module of the clausebase. The argument must be an atom or a instantiated variable which contains an atom. The atom argument is unified with the name of the active module, this is not the filename of the active module. If no module with the specified name is present then the predicate fails.
With set_active_module/0 the module which contains this statement is made the active module.
see also: active_module/1 check_singleton/1 close_all_modules/0 close_module/1 consult/0 consult/1 consult/3 create_module/1 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 this_module/3
| Examples | |
| set_active_module(X). | throws an exception; type_error(atom, X) |
| X=m12, set_active_module(X). | succeeds, if there is a module with the same internal name |
| set_active_module(m15). | fails, if there is no module with the name m15 |
| Exceptions | |
| The argument is a variable | an instantiation_error exception is thrown |
| The argument Arg is not an atom | a type_error(atom, Arg) exception is thrown |
| No module with the specified Name exists | an existence_error(module, Name) exception is thrown |