Hi Ernest,

        Thanks very much for your response.  I tried what you gave, and I
couldn't get the match to happen.  (I noticed that the left hand argument
to eq doesn't have a question mark--I tried it without and with.)
        Here is what I tried:


?path-node <- (path-node (path ?path-id)&:(eq ?path-id ?*selected-path-id*))
                         (node ?node-id)
                         (act-classification nil))


That doesn't work.  But when I do the following:


?path-node <- (path-node (path ?path-id)
                         (node ?node-id)
                         (act-classification nil))
(test (eq ?path-id ?*selected-path-id*))


it works just fine.  And so problem is solved, though I'd like to know
why the first way isn't working if you see it.  (Again, I tried it without
the ? in front of path-id as well, as your examples seemed to suggest.)

        Thanks,
        Willie



On Fri, 16 Mar 2001, friedman_hill ernest j wrote:

> 
> (get-var) was a kludge to let you refer to globals on rule LHSs at all
> -- i.e., to allow you to even use them in expressions like
> 
> (foo (bar ?a&:(eq a (get-var ?*b*))))
> 
> Nowadays you can just write
> 
> (foo (bar ?a&:(eq a ?*b*)))
> 
> So the get-var function doesn't exist anymore. The ability to directly
> match defglobals, something like
> 
> (defrule foo
>     (global ?*b* 37)
> 
> is something that we have indeed talked about, but I've never
> implemented. 
> 
> 
> I think Willie Wheeler wrote:
> > Hi all,
> > 
> >     I am trying to figure out how to match globals on the left-hand
> > side.  I searched the archives and found Jess's behavior with respect to
> > this issue characterized variously as a bug and as a idiosyncracy, and I
> > even found a message where a "matchable" attribute for defglobal was
> > proposed, but there is no mention of a solution.  (Well, there was one
> > mention of a get-var function being involved, but I don't see any such
> > function in the manual and it doesn't seem to work in the code.)
> > 
> >     Willie
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------
> Ernest Friedman-Hill  
> Distributed Systems Research        Phone: (925) 294-2154
> Sandia National Labs                FAX:   (925) 294-2234
> Org. 8920, MS 9012                  [EMAIL PROTECTED]
> PO Box 969                  http://herzberg.ca.sandia.gov
> Livermore, CA 94550
> 


---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to