phatassbob
MIS
Hi,
I want to solve a query that can have multiple answers and I want the answers to be output to a text file.
The problem is that I can only get the first answer to output and not the rest.
My code is as follows.
solve:-
top_goal(X),
open('out.txt',append,OS),
write(OS,X),nl(OS),
close(OS).
Where top_goal is produces values for X.
Can anyone help?
Thanks in advance
I want to solve a query that can have multiple answers and I want the answers to be output to a text file.
The problem is that I can only get the first answer to output and not the rest.
My code is as follows.
solve:-
top_goal(X),
open('out.txt',append,OS),
write(OS,X),nl(OS),
close(OS).
Where top_goal is produces values for X.
Can anyone help?
Thanks in advance