Question

I have this prolog predicate that computes the number of primes depending on the input count.

However on the interpretator, it only shows the first 9 primes even though I input my required prime count as 10.

the result looks like this as below

  L = [2, 3, 5, 7, 11, 13, 17, 19, 23|...] 

However, when I trace through using the graphical debugger, the correct results are actually churned out.

So I am wondering what does the | ... means?

Was it helpful?

Solution

The interpreter truncates answers that are "too long".

Add this at the top:

set_prolog_flag(toplevel_print_options, [quoted(true)])

See example of this: http://garysieling.com/blog/printing-all-prolog-answers-to-a-file

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top