Download context/2 - bei IF Computer
Transcript
TermUnifyCompound()
C-Function
Active C interface
Example
The following simple C function realizes a predicate mk indicator/3, which makes a
predicate indicator from given name and arity.
#include "cpred.h"
BOOLEAN mk_indicator_3(void)
/*
** mk_indicator( +Functor, +Arity, -Indicator )
*/
{
STRING string;
long value;
TERM functor = PrologArg(1);
TERM arity = PrologArg(2);
return TermIsAtom(functor,&string)
&&
TermIsInteger(arity,&value)
&&
TermUnifyCompound(PrologArg(3),
"/",2,functor,arity);
}
void Cboot(void)
{
CPRIM("mk_indicator",3,mk_indicator_3);
}
See also
TermUnifyFunctor(), TermUnifyUniversal(), TermUnify(), TermMakeCompound()
IF/Prolog V5.3
783
Reference Manual
Related documents
Frigidaire E44NB60ESS (NG) All-in
User's Guide - bei IF Computer
In this ESO-MIDAS Courier
cache - The XML Cover Pages
HC(S)12(X) Debugger.book
Freescale Semiconductor Microcontrollers User's Manual
B-Prolog User`s Manual - Computer and Information Science
Scala Join (version 0.3) User's Manual
IATE ALC and X.25 Gateway
デルタ 20 プラス LED ダーマトスコープ 取扱説明書
Pazpar2 - User's Guide and Reference
The Modular Web Framework User`s manual
MVI46-AFC User Manual