0

Possible Duplicate:
Using SWI-Prolog Interactively - Output Taken off

I have written a program to replace X occurrences of 1 by 8 in Prolog.

The program works correct as it gives correct output. But it abbreviates my output when I give it long input. How to prevent this?

Example:

X = [2, 8, 3, 8, 4, 8, 5, 1, 6|...] .

Is the output for

replace_first_k(3,[2,1,3,1,4,1,5,1,6,1],X).

How to display all the characters of X in output terminal?

Community
  • 1
  • 1
footy
  • 5,803
  • 13
  • 48
  • 96
  • http://stackoverflow.com/questions/12427082/prolog-showing-results-on-the-interpretator/12427222#12427222 Possible duplicate of. – Borgleader Dec 02 '12 at 05:17

1 Answers1

1

Did you try using

Write(X)

You can use it at each step of your function so it keeps on printing the part of array it has passed through.

Fyre
  • 1,180
  • 8
  • 12