This Prolog compile directive declares that one or more clauses is an external clause. The implementation of an external clause is contained in an external library. For more information about creating external libraries see external Prolog clauses and classes.
see also: external_class/2 predicate indicators discontiguous/1 ensure_loaded/1 include/1 initialization/1 multifile/1 private/0 private/1 public/0 public/1
| Examples | |
| external( 'test.dll', [test / 0] ). | there is an external predicate with the functor 'test' and arity 0 and it is implemented in the external library 'test.dll' |
| external( 'talk.dll', [talk / 1, talk / 2]). | the predicates talk/1 and talk/2 are declared external and their implementation is in the file 'talk.dll'. |
| Exceptions | |
| first argument is a variable | an instantiation_error. exception is thrown |
| first argument is a list or an empty list | a type_error(atom, Argument) exception is thrown |
| see predicate indicator for more possible exceptions | |