

\begin{tt}
\begin{verbatim}

/* Example of C++ code that is to be incrementally loaded into CORAL */

#include <stdio.h>

/* The export statement below says that this function defines a built-in
predicate whose first argument is a double and whose second argument is
also a double.  Note that the output value of this function is 
automatically mapped to the second argument of the built-in, which 
is therefore to be called with a bf binding pattern.  For example, 
we could have myfunc(X,Y) appear in rule in a declarative module.  
X must be bound to a double.  */

_coral_export double myfunc(double);

double myfunc(double x) 
{
  return x*2 ;
}

\end{verbatim}
\end{tt}

