How call RAW text with Prolog predicate from C?
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <442fe6e13f42369428762b5b272fc3ff@localhost> |
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); Pl_Query_End(PL_KEEP_FOR_PROLOG); Pl_Stop_Prolog(); But that not work. Please help me.