# Having trouble using multifile/1 for multi-file predicates

**URL:** <https://swi-prolog.discourse.group/t/having-trouble-using-multifile-1-for-multi-file-predicates/4460>\
**Category:** Help!\
**Created:** [September 18, 2021, 7:31pm UTC](https://swi-prolog.discourse.group/t/having-trouble-using-multifile-1-for-multi-file-predicates/4460 "2021-09-18T19:31:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [September 18, 2021, 8:27pm UTC](https://swi-prolog.discourse.group/t/having-trouble-using-multifile-1-for-multi-file-predicates/4460/4 "2021-09-18T20:27:30Z")

</div>

> [@shonfeder](#):
>
> we need to prefix the predicate with the module it gets asserted into?

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.

* * *

> [@shonfeder](#):
>
> Am I alone in thinking that this is not even hinted at in the slightest from the documentation on [multifile/1](https://www.swi-prolog.org/pldoc/doc_for?object=multifile/1) 🙂 ?

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](https://github.com/SWI-Prolog). 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++](https://notepad-plus-plus.org/) is so much better than using the GitHub search.

![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/c/cf87ad83513815e11a376c7a9508448e46918315.png)

HTH

I don’t know how many people actually read the [intro](https://www.swi-prolog.org/pldoc/doc_for?object=manual) 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. 😀

* * *

**EDIT**

Forgot to note that the directory I use with [NotePad++](https://notepad-plus-plus.org/) for searching includes several of the repositories from the SWI-Prolog GitHub account. This way more can esaily be added, including [packs](https://www.swi-prolog.org/pack/list) and newer versions can easily be updated.

```plaintext
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

```

---

_[View the full topic](https://swi-prolog.discourse.group/t/having-trouble-using-multifile-1-for-multi-file-predicates/4460)._
