# Findall displaying only 9 resulting elements

**URL:** <https://swi-prolog.discourse.group/t/findall-displaying-only-9-resulting-elements/2721>\
**Category:** Help!\
**Created:** [July 30, 2020, 12:16pm UTC](https://swi-prolog.discourse.group/t/findall-displaying-only-9-resulting-elements/2721 "2020-07-30T12:16:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ILogre](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@ILogre](https://swi-prolog.discourse.group/u/ILogre)\
**Post date:** [July 30, 2020, 12:16pm UTC](https://swi-prolog.discourse.group/t/findall-displaying-only-9-resulting-elements/2721/1 "2020-07-30T12:16:15Z")

</div>

Hello !

I’m using SWI-Prolog version 6.2.2  
I want the code to display all solutions to a goal, so I’m using findall/3.  
It almost works but what I’m getting is:

```prolog
Results = [result1, result2, result3, result4, result5, result6, result7, result8, result9|...].

```

How can I make it so it does not push some results in the tail of the answer, I just want ALL my result list, not the 9 first elements.

My code looks like this:

```prolog
things(thing1,[property1,property2,property3,property4]).
things(thing2,[property1,property3,property5,]).
% etc. defining around 50 "things"

seekProperty(P,T) :- things(T,L), member(I, L).

seek(P,T) :- findall(T, seekProperty(P,T), Things).

```

Execution :

```prolog
seek(property3,Things).

```

Thank you !

---

<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:** [July 30, 2020, 12:21pm UTC](https://swi-prolog.discourse.group/t/findall-displaying-only-9-resulting-elements/2721/2 "2020-07-30T12:21:37Z")

</div>

See: [Help: I want the whole answer](https://www.swi-prolog.org/FAQ/AllOutput.html)

---

<div class="post-metadata">

**Author:** ![ILogre](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@ILogre](https://swi-prolog.discourse.group/u/ILogre)\
**Post date:** [July 30, 2020, 12:52pm UTC](https://swi-prolog.discourse.group/t/findall-displaying-only-9-resulting-elements/2721/3 "2020-07-30T12:52:03Z")

</div>

It is unfortunate that it requires a user input.

I will try to change the default behavior, bur the location of the init.pl file (as indicated in [https://www.swi-prolog.org/FAQ/PlInitialisation.html](https://www.swi-prolog.org/FAQ/PlInitialisation.html)) to change the default settings is not correct.  
Actually the only init.pl associated with Prolog on my whole machine is in C:\Program Files (x86)\swipl\customize  
Adding the set\_prolog\_flag/2 directive in this file as adviced in your link does not work (still have 9 results then a tail).

---

<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:** [July 30, 2020, 1:00pm UTC](https://swi-prolog.discourse.group/t/findall-displaying-only-9-resulting-elements/2721/4 "2020-07-30T13:00:39Z")

</div>

I never change the setting and always use the `;true` option so I will check to see if I can reproduce the problem. Another [post](https://swi-prolog.discourse.group/t/is-there-a-way-to-make-the-stacktrace-print-terms-in-full/2720) seems to be hinting at the same.

---

<div class="post-metadata">

**Author:** ![ILogre](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@ILogre](https://swi-prolog.discourse.group/u/ILogre)\
**Post date:** [July 30, 2020, 1:06pm UTC](https://swi-prolog.discourse.group/t/findall-displaying-only-9-resulting-elements/2721/5 "2020-07-30T13:06:03Z")

</div>

I found a way :  
I edited the `init.pl` found in `Programs/swipl/customize/` and saved it in `\AppData\Roaming\SWI-Prolog`  
( run `?- absolute_file_name(app_config(.), Dir, [file_type(directory)]).` to have the proper directory on your environment).

This way it works !
