users-prolog
[Top][All Lists]
Advanced

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

fetching list results from prolog into c


From: address@hidden
Subject: fetching list results from prolog into c
Date: Wed, 09 Nov 2005 17:40:34 -0000

hello-

i am trying to printf the output of a predicate.  the output is
Wamword that was created with Mk_Proper_List.

In my c code:
.......
res = Pl_Query_Call(func, 1, arg);
while(res) {
par = Rd_List(arg[0]);
printf("words = %s\n",Rd_String(par[0]));
res = Pl_Query_Next_Solution();
}

this will only output the first "token" in the list of strings that
the predicate returns.

i have read the documentation of "Calling Prolog from C". but i am
looking for examples of code or gprolog.h documentation.

any help would be much appreciated.

thanks

nik livic




reply via email to

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