Re: How to get the return value from gprolog in C?
Sean Charles <[email protected]>
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <[email protected]> |
Forgot to add… the code should probably be something like this (not tested) if you wanted to ask “anc(bob,john)”…
Pl_Query_Begin(PL_TRUE);
arg[0] = Pl_Mk_String(“bob");
arg[1] = Pl_Mk_String(“john");
res = Pl_Query_Call(func, 2, arg);
and then res will be NULL or NOT-NULL I guess to indicate true / false.