fetching list results from prolog into c

"[email protected]" <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
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
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.