问题
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?
回答1:
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
来源:https://stackoverflow.com/questions/12427082/prolog-showing-results-on-the-interpretator