I can not understand what kind of given me pull out the function clause. You've never used this thing to show you the steps that the interpreter has made to reach the goal?
Unfortunately does not work. In the variables First and Last are values like "hi (foo)" and "hi (george)" but both are not strings, I do not know what they are.
In "write_result(String)" I pass a string, but First and Last no string.
So I would have those two variables as strings. If you read the code and try it you maybe it is easier to understand my problem, otherwise try to ask what is not clear.
Thank you very much for your help.
Excuse me how do I transform the variables into a string? I implemented this:
write_result(String) :-
replace("(", String, " è ", NewString1),
replace(")", NewString1, ".", ResultString),
atom_chars(Result, ResultString),
write(Result).
write_body(N,(First,Rest)) :-
tab(N)...
Hello everyone, I am new to the forum and then I'm sorry if there stupid questions.
I found this expert system on the network:
% Native - a simple shell for use with Prolog
% knowledge bases. It includes expanations.
:-op(900,xfy, :).
main :-
greeting,
repeat,
write('> '),
read(X)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.