<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <META name="GENERATOR" content="hevea 1.06-7 of 2001-11-14"> <TITLE> Interfacing Prolog and C </TITLE> </HEAD> <BODY TEXT=black BGCOLOR=white> <A HREF="manual054.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A> <A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A> <A HREF="manual071.html"><IMG SRC ="next_motif.gif" ALT="Next"></A> <HR> <TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%"> <TR><TD BGCOLOR="#2dbae5"><DIV ALIGN=center><TABLE> <TR><TD><FONT SIZE=5><B><A NAME="htoc340">9</A></B></FONT></TD> <TD WIDTH="100%" ALIGN=center><FONT SIZE=5><B>Interfacing Prolog and C</B></FONT></TD> </TR></TABLE></DIV></TD> </TR></TABLE> <A NAME="Interfacing-Prolog-and-C"></A> <UL> <LI><A HREF="manual066.html"> Calling C from Prolog</A> <UL> <LI><A HREF="manual066.html#toc277"> Introduction</A> <LI><A HREF="manual066.html#toc278"> <TT>foreign/2</TT> directive</A> <LI><A HREF="manual066.html#toc279"> The C function</A> <LI><A HREF="manual066.html#toc280"> Input arguments</A> <LI><A HREF="manual066.html#toc281"> Output arguments</A> <LI><A HREF="manual066.html#toc282"> Input/output arguments</A> <LI><A HREF="manual066.html#toc283"> Writing non-deterministic C code</A> <LI><A HREF="manual066.html#toc284"> Example: input and output arguments</A> <LI><A HREF="manual066.html#toc285"> Example: non-deterministic code</A> <LI><A HREF="manual066.html#toc286"> Example: input/output arguments</A> </UL> <LI><A HREF="manual067.html"> Manipulating Prolog terms</A> <UL> <LI><A HREF="manual067.html#toc287"> Introduction</A> <LI><A HREF="manual067.html#toc288"> Managing Prolog atoms</A> <LI><A HREF="manual067.html#toc289"> Reading Prolog terms</A> <LI><A HREF="manual067.html#toc290"> Unifying Prolog terms</A> <LI><A HREF="manual067.html#toc291"> Creating Prolog terms</A> <LI><A HREF="manual067.html#toc292"> Testing the type of Prolog terms</A> <LI><A HREF="manual067.html#toc293"> Comparing Prolog terms</A> <LI><A HREF="manual067.html#toc294"> Copying Prolog terms</A> <LI><A HREF="manual067.html#toc295"> Comparing and evaluating arithmetic expressions</A> </UL> <LI><A HREF="manual068.html"> Raising Prolog errors</A> <UL> <LI><A HREF="manual068.html#toc296"> Managing the error context</A> <LI><A HREF="manual068.html#toc297"> Instantiation error</A> <LI><A HREF="manual068.html#toc298"> Type error</A> <LI><A HREF="manual068.html#toc299"> Domain error</A> <LI><A HREF="manual068.html#toc300"> Existence error</A> <LI><A HREF="manual068.html#toc301"> Permission error</A> <LI><A HREF="manual068.html#toc302"> Representation error</A> <LI><A HREF="manual068.html#toc303"> Evaluation error</A> <LI><A HREF="manual068.html#toc304"> Resource error</A> <LI><A HREF="manual068.html#toc305"> Syntax error</A> <LI><A HREF="manual068.html#toc306"> System error</A> </UL> <LI><A HREF="manual069.html"> Calling Prolog from C</A> <UL> <LI><A HREF="manual069.html#toc307"> Introduction</A> <LI><A HREF="manual069.html#toc308"> Example: <TT>my_call/1</TT> - a <TT>call/1</TT> clone</A> <LI><A HREF="manual069.html#toc309"> Example: recovering the list of all operators</A> </UL> <LI><A HREF="manual070.html"> Defining a new C <TT>main()</TT> function</A> <UL> <LI><A HREF="manual070.html#toc310"> Example: asking for ancestors</A> </UL> </UL> <BR> <BR> <HR SIZE=2> Copyright (C) 1999-2002 Daniel Diaz <BR> <BR> Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. <BR> <BR> <A HREF="index.html#copyright">More about the copyright</A> <HR> <A HREF="manual054.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A> <A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A> <A HREF="manual071.html"><IMG SRC ="next_motif.gif" ALT="Next"></A> </BODY> </HTML>