PlCall() публичный статический Метод

public static PlCall ( string s ) : bool
s string
Результат bool
Пример #1
0
        /// <summary>
        ///  ?- closure(v(V1,V2),format('I was called with ~q ~q ...',[V1,V2]).
        /// </summary>
        /// <param name="info"></param>
        /// <param name="instance"></param>
        /// <param name="closureTerm"></param>
        public ClosureDelegate(EventInfo info, object instance, PlTerm clousreTerm)
        {
            Event    = info;
            Instance = instance;
            SetInstanceOfDelegateType(info.EventHandlerType);
            PlTerm plC = PlTerm.PlVar();

            PrologCLR.PlCall("system", "copy_term", new PlTermV(clousreTerm, plC));
            this.closureTerm = libpl.PL_record(clousreTerm.TermRef);
            Event.AddEventHandler(instance, Delegate);
        }
Пример #2
0
        public override object CallPrologFast(object[] paramz)
        {
            PrologCLR.RegisterCurrentThread();
            var    results = paramz;
            PlTerm plC     = PlTerm.PlVar();

            libpl.PL_recorded(closureTerm, plC.TermRef);
            PlTerm ctestVars = plC.Arg(0);
            PlTerm ctestCode = plC.Arg(1);

            PlTerm[] terms  = PrologCLR.ToTermArray(ctestVars);
            int      idx    = terms.Length - 1;
            int      resdex = results.Length - 1;;

            while (idx >= 0 && resdex >= 0)
            {
                terms[idx--].FromObject(results[resdex--]);
            }
            PrologCLR.PlCall("user", "call", new PlTermV(ctestCode, 1));
            return(null);
        }
Пример #3
0
 public static bool PlCall(string module, string querypred, PlTermV termV)
 {
     return(PrologCLR.PlCall(module, querypred, termV));
 }