Swi-cs-pl - A CSharp class library to connect .NET languages with SWI-Prolog
PlType Enumeration
SwiPlCs interfaceSbsSW.SwiPlCsPlType
Obtain the type of a term, which should be a term returned by one of the other interface predicates or passed as an argument. The function returns the type of the Prolog term. The type identifiers are listed below.
Declaration Syntax
C#Visual BasicVisual C++F#
public enum PlType
Public Enumeration PlType
public enum class PlType
type PlType
Members
MemberDescription
PlUnknown0 - PL_UNKNOWN: Undefined
PlVariable1 - PL_VARIABLE: An unbound variable. The value of term as such is a unique identifier for the variable.
PlAtom2 - PL_ATOM: A Prolog atom.
PlInteger3 - PL_INTEGER: A Prolog integer.
PlFloat4 - PL_FLOAT: A Prolog floating point number.
PlString5 - PL_STRING: A Prolog string.
PlTerm6 - PL_TERM: A compound term. Note that a list is a compound term ./2.
Remarks
see PL_term_type(term_t) in the SWI-Prolog Manual.
Examples
In this sample a Prolog variable is created in PlTerm t and the PlType is checked by his integer representation and his name.
 Copy imageCopy
PlTerm t = PlTerm.PlVar();
Assert.AreEqual(1, (int)t.PlType);
Assert.AreEqual(PlType.PlVariable, t.PlType);
See Also

Assembly: SwiPlCs (Module: SwiPlCs.dll) Version: 1.1.60601.0 (1.1.60601.0)