[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How call RAW text with Prolog predicate from C?
From: |
pva |
Subject: |
How call RAW text with Prolog predicate from C? |
Date: |
Thu, 23 Apr 2009 19:04:25 +0600 |
User-agent: |
RoundCube Webmail/0.2a |
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.
- How call RAW text with Prolog predicate from C?,
pva <=