Re: How call RAW text with Prolog predicate from C?

Cesar Rabak <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
[email protected] escreveu:
> Hello. I'am sorry for my bad English(russian).
> 
> I want call from C application Prolog predicates. 
> I try that:
> 
> PlTerm goal;
> ....
> Pl_Start_Prolog(0, 0);
> 
> char str[]="asserta(parent(bob,mary))"; //or ANYthing else in string
> format.
> 
> goal = Pl_Mk_Atom(Pl_Create_Allocate_Atom(str));
> 
> args = Pl_Rd_Callable_Check(goal, &functor, &arity);
> 
> Pl_Query_Begin(PL_TRUE);
> 
> Pl_Query_Call(functor, arity, args);

Where are you checking the return of Pl_Query_Call?


-- 
Cesar Rabak
GNU/Linux User 52247.
Get counted: http://counter.li.org/
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.