From 323ada012d3bed0c6f7a6d5d0ee14b409b7457c7 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 13 Aug 2008 14:13:49 +0000 Subject: Mantis#1931. Thank you kindly, Kinoc for a patch that: * Yield Prolog 1.0.1 Released : it passes all but 9 of the 421 tests in the ISO Prolog test suite (97.8%) . * support dynamic predicates and rules. * support 'import' to use external static functions improves connection to C# functions * Matches Yield Prolog r831 --- .../Shared/Api/Runtime/YieldProlog/Functor3.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs index 907bfca..b237a82 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs @@ -53,6 +53,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog { } + // disable warning on l1, don't see how we can + // code this differently + #pragma warning disable 0168 + /// If arg is another Functor3, then succeed (yield once) if this and arg have the + /// same name and all functor args unify, otherwise fail (don't yield). + /// If arg is a Variable, then call its unify to unify with this. + /// Otherwise fail (don't yield). public IEnumerable unify(object arg) { arg = YP.getValue(arg); @@ -61,9 +68,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog Functor3 argFunctor = (Functor3)arg; if (_name.Equals(argFunctor._name)) { -// disable warning: don't see how we can code this differently short -// of rewriting the whole thing -#pragma warning disable 0168 foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) { foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) @@ -72,19 +76,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog yield return false; } } -#pragma warning restore 0168 } } else if (arg is Variable) { -// disable warning: don't see how we can code this differently short -// of rewriting the whole thing -#pragma warning disable 0168 foreach (bool l1 in ((Variable)arg).unify(this)) yield return false; -#pragma warning restore 0168 } } + #pragma warning restore 0168 public override string ToString() { -- cgit v1.1