next up previous contents index
Next: Constructing Terms Up: Analysing Terms via the Previous: Reading a list   Contents   Index


An example: defining write1 in C

pl-display shows a simplified definition of write1 to illustrate the described functions. This simplified version does not deal with operators. It is called display1, because it mimics closely the behaviour of this Edinburgh predicate.

Figure: A Foreign definition of display1
\begin{figure}\begin{code}
foreign_t
pl_display(term_t t)
{ functor_t functor;
...
...should not happen */
}
\par PL_succeed;
}
\end{code}\par\noindent
\end{figure}



Dr. Richard Botting 2001-12-12