include(+term) [ISO]

If F is a ground term designating a Prolog text then prolog text P1 which contains a directive include(F) is identical to a prolog text P2 obtained by replacing the directive include(F) in P1 by the prolog text denoted by F. It is possible to include the same file multiple times.

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 discontiguous/1 dynamic/1 dynamic/2 ensure_loaded/1 import/1 import/2 import_module/1 import_module/2 initialization/1 module/3 module_name/2 modules multifile/1 not_redo/1 open_module/0 open_module/1 open_module/3 open_module_search/3 open_standard_module/2 private/0 private/1 public/0 public/1 save_module/1 save_module/2 save_module/3 set_active_module/0 set_active_module/1 this_module/3

Examples
include('c:\\Prolog Files\\Trinc\\Trinc-Prolog\\modules\\win.txt'). when this directive is encountered while loading a Prolog text then the file 'win.txt' of Trinc-Prolog is inserted into the module being loaded
include('..\\Mymodules\\do.txt'). when this predicate is encounterd the location of the file being prepared is combined with the specified relative path to include the file 'do.txt'

 

 

info@trinc-prolog.com