private(+predicate_indicator)

This predicate makes all predicates that are specified by the predicate indicator, list of predicate indicators or a predicate indicator sequence private, they are not accessible by predicates from another module. This version of private can also be used inside modules, if so it is executed after the module has been loaded and compiled. 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 import/1 import/2 import_module/1 import_module/2 include/1 initialization/1 multifile/1 not_redo/1 private/0 public/0 public/1

Examples
private(test2/0). all predicates with the name 'test2' and no arguments are made private
private([test2/0, test_ap/1]). all 'test2' predicates with no arguments and all 'test_apple' predicates with one argument are made private

 

 

info@trinc-prolog.com