open_module

This predicate opens a module, a file open dialog is displayed and if the user selects a file and it was successfully opened then the predicate succeeds, else it fails. A module name is generated and the module is opened in the read-write mode. Windows NT 4 displays the following dialog window:

Pl_img85.gif (7291 bytes)

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/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
open_module. display a 'Open' dialog window and open the file selected by the user after the 'Open' button was pressed

 

Exceptions
the same file is already open or there is already a module with the same name a existence_error(module, A) exception is thrown
no valid module name could be generated a existence_error(module, A) exception is thrown
the file cannot be opened a existence_error(module_file, A) exception is thrown
one or more errors found in the module being opened a compile_error(module, A) exception is thrown, A is replaced by the internal of the module

 

 

info@trinc-prolog.com