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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.