Hi there,
I am trying to call gprolog in my C code. Instead of getting the solutions,
wonder if I could get the gprolog function output (true/false) directly in
my C code. Below is the example:
Based on -
http://gprolog.univ-paris1.fr/manual/html_node/gprolog072.html
Given the pl file:
parent(bob, mary).
parent(jane, mary).
parent(mary, peter).
parent(paul, peter).
parent(peter, john).
anc(X, Y):-
parent(X, Y).
anc(X, Z) :-
parent(X, Y),
anc(Y, Z).
I know how to retrieve the solution from anc(X,john). However, if the query
is anc(bob,john), then how could I retrieve the return value (true) from the
gprolog in my C code? I have gone thru gprolog.h for a while. But it seems
there is not such a func used to get the return value...
Thanks,
Dave
--
View this message in context:
http://gnu-prolog.996310.n3.nabble.com/How-to-get-the-return-value-from-gprolog-in-C-tp1166.html
Sent from the Users mailing list archive at Nabble.com.
_______________________________________________
Users-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/users-prolog