Having trouble using multifile/1 for multi-file predicates

I don’t believe so but as I can never remember exactly which module they will default to, IIRC it can vary, so I just make up a module name and use it and then don’t have to spend time using predicate_property/2 and such to figure out which modules they landed.


No. I think for many of us understanding the SWI-Prolog documentation is an acquired skill. The one thing that helped me and still helps me a lot in learning how the predicates work is to seek working examples of them. The best place to see correct usage of them is in the actual SWI-Prolog source code on GitHub. As a matter of fact, I tend to do searches of the code so often that I have a session of NotePad++ open for searching the Prolog and C code. The search in NotePad++ is so much better than using the GitHub search.

image

HTH

I don’t know how many people actually read the intro to the SWI-Prolog docs but it notes

This document is a reference manual . That means that it documents the system, but it does not explain the basics of the Prolog language and it leaves many details of the syntax, semantics and built-in primitives undefined where SWI-Prolog follows the standards. This manual is intended for people that are familiar with Prolog.

You have to love it. :grinning:


EDIT

Forgot to note that the directory I use with NotePad++ for searching includes several of the repositories from the SWI-Prolog GitHub account. This way more can esaily be added, including packs and newer versions can easily be updated.

C:\Users\Groot\Documents\GitHub\SWI-Prolog>dir /b
packages-chr-master
packages-http-master
packages-pldoc-master
packages-RDF-master
packages-semweb-master
packages-sgml-master
packages-xpce-master
plweb-blog-master
plweb-examples-master
plweb-master
plweb-www-master
swipl-devel-master
swipl-server-js-client-master
swish-master
1 Like