I use the latest version of ECLiPSe Prolog 64-bit for Windows, then I compile the code:
:- op(200, yf, !).
!(N, F) :- fac(N, 1, F).
fac(0, F0, F) :- !, F=F0.
fac(N, F0, F) :- N1 is N-1, F1 is F0*N, fac(N1, F1, F).
Query entered:
?- X is 100000 !.
X = 28242294079603478742934215200555696886678...
Yes (8.17s cpu)
First question: Why shows only 1999 digits and no the 456574 complete digits in TkEclipse?
Second question: Offers the possibility to log the interaction with the user on a file ECLiPSe Prolog as protocol(+File) of SWI-Prolog?
I'm sorry for doing two questions. I will be grateful for any help you can provide.
ECLiPSe does print the complete result to a stream called
answer_output
, but the text is later truncated by the graphical user interface.The easiest way to get the result into a file is to write it there explicitly, e.g.