:- discontiguous foreign_resource/2.
Describes the foreign functions in ResourceName to interface to.
A list of foreign function symbols that will be obtained from ResourceName.
The user has to define a
foreign_resource/2 fact for every
foreign resource that is to be loaded into Prolog. The
ForeignFunctions gives the list of foreign symbols that are to
be found in the given foreign resource. When a foreign resource is loaded
load_foreign_resource/1, Prolog looks for a
foreign_resource/2 fact for that foreign resource and finds the address
of each symbol listed in that fact. Prolog also
foreign/[2,3] definition for each symbol in the
second argument of that fact.
foreign_resource/2 facts are used only in the context of a
load_foreign_resource/1 command and can be removed once the foreign
resource has been loaded.
Contrary to most hook predicates which reside in the
load_foreign_resource/1 will look for
foreign_resource/2 facts defined
in its source module.
Error handling is performed by
foreign/[2,3], Calling C from Prolog.