export(+atom, +predicate_indicator)

This built-in predicate declares all predicates that are specified by the predicate indicator, list of predicate indicators or predicate indicator sequence as exported for the module specified by the first atomic argument. Exported predicates may be called from inside other modules than the module in which it is implemented.

With export/2 it is possible to specify for another module which clauses it exports. For more information see the module system. The clause succeeds if at least a single clause indicator succeeds.

see also: check_singleton/1 discontiguous/1 dynamic/1 dynamic/2 ensure_loaded/1 include/1 initialization/1 multifile/1 private/0 private/1 public/0

Examples
export( calc, test2 / 0 ). all predicates with the name 'test2' and no arguments are declared as exported for the module with the name 'calc'
export( calc, [ test2 / 0, apple / 1 ]). all 'test2' predicates with no arguments and all 'test_apple' predicates with one argument are declared as exported for the module with the name 'calc'

 

 

info@trinc-prolog.com