Swi-cs-pl - A CSharp class library to connect .NET languages with SWI-Prolog
Explicit Operator
SwiPlCs interface ► SbsSW.SwiPlCs ► PlTerm ► ExplicitNarrowingExplicitExplicitExplicit(PlTerm to Int32)
Yields a int if the PlTerm is a Prolog integer or float that can be converted
without loss to a int. Throws a PlTypeException exception otherwise
Declaration Syntax
Parameters
- term (PlTerm)
- A PlTerm is a Prolog integer or float that can be converted without loss to a int.
Return Value
A C# int
Exceptions
Exception | Condition |
---|---|
PlTypeException | Throws a PlTypeException exception if PlType
is not a PlType.PlInteger or a PlType.PlFloat. |
PreconditionException | Is thrown if the operator is used on an uninitialized PlTerm |