Subject: Re: [SWIPL] Passing Results from Prolog!

From: Jan Wielemaker <[email-masked]>
Date: Fri, 1 Jun 2001 10:18:04 +0200

On Fri, 01 Jun 2001, Mehmet Donderler wrote:
>Dear all:
>
>I have some C code from which I call Prolog predicates, and I would like
>to have the values returned so as to use them in my C code. It is possible
>to do that with JPL (Java Prolog Interface), and it should also be
>possible to obtain the results from Prolog predicates using C
>as well. I would be very grateful if you could suggest me a method whereby
>I could pass the results from Prolog to my C code since I could not find
>a way to do so except for writing the results in a file within the Prolog
>environment and then reading that file from within my C code.

There are numerous examples and a complete chapter on that in the
manual.  There are also some things on the Twiki web and various
detailed issues in the history of this list.

If you are happy(ier) with C++, look at SWI-cpp.h, which is documented
in ...\pl\doc\packages\pl2cpp.html

	--- Jan