users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: asserta/retract via C++


From: aLu
Subject: Re: asserta/retract via C++
Date: Sat, 19 Jul 2008 15:34:17 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Basically my code looks like this:

PlTerm arg[10];
int func = Find_Atom(asserta);
arg[0] = Mk_String("lives(elvis)");

Pl_Query_Begin(TRUE);
Pl_Query_Call(func, 1, arg);


//If the same program calls something like this (in another function):

int func = Find_Atom(listing); 
Pl_Query_Begin(TRUE);
Pl_Query_Call(func, 0, arg2);


///




It prints something like this out to the console:

number1(abc,cba).                          // these are dynamic predicates
number1(cga,bae).
number2(get,gea).

'lives(elvis)'.                            // those brackets are my problem!

someotherpredicate(gla,era).


So how can I avoid that my predicate appears in brackets?
Is it about Mk_String? Mk_Atom(Create_Atom("lives(elvis)")) 
gives the same result.

Thanks for reading












reply via email to

[Prev in Thread] Current Thread [Next in Thread]