aboutsummaryrefslogtreecommitdiff
path: root/c/pl.cpp
blob: 30b70a9e21bbbb2484baad337b765a88f47cb31f (plain)
1
2
3
4
5
6
7
8
9
#include <SWI-Prolog.h>

int Pl(const char *szMod, const char *szPred)
{
	term_t t = PL_new_term_refs(0);
	if (!PL_call_predicate(NULL, PL_Q_NORMAL, PL_predicate(szPred, 0, szMod), t))
		return 0;
	return 1;
}