Explicit Operator

SWI-Prolog SbsSW.SwiPlCs

Swi-cs-pl - A CSharp class library to connect .NET languages with SWI-Prolog Explicit Operator
SwiPlCs interfaceSbsSW.SwiPlCsPlTermExplicitNarrowingExplicitExplicitExplicit(PlTerm to Double)
Yields the value as a C# double if PlTerm represents a Prolog integer or float. Throws a PlTypeException exception otherwise.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator double (
	PlTerm term
)
Public Shared Narrowing Operator CType ( _
	term As PlTerm _
) As Double
static explicit operator double (
	PlTerm term
)
Parameters
term (PlTerm)
A PlTerm represents a Prolog integer or float
Return Value
A C# double
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

Assembly: SwiPlCs (Module: SwiPlCs) Version: 1.1.60301.0 (1.1.60301.0)