Compare your rule to the manual again, and I think you'll see that
you've inserted an extra sets of parentheses, one right before the ?e
in "(bind ?e", with the matching one at the end of the line.

To explain the error message: if you look closely at it, you'll see
Jess has inserted a "call" functor while trying to interpret your code
-- any time Jess sees "(?variable" is assumes it is shorthand for
"(call ?variable..."  and so that's what it's trying.

Anyway, while in C/Java/FORTRAN etc extra parens rarely cause
problems, in Jess they -always- will. Parens in Jess aren't grouping
operators, but more like statement delimiters.


I think Matt Bishop wrote:
> I have a query that looks like this:
> 
> (defquery collect-sectionless-pages
>     (Page (onSection nil))
> )
> 
> Where Page is a template with a slot called onSection.  One rule creates a
> bunch of Page facts with nil onSection values.  Another rule collects these
> pages and applies onSection values according to some detailed rules.
> 
> The pattern works successfully in another rule.
> 
> This query, however, generates the following runtime error:
> 
> Jess reported an error in routine ValueVector.get
>     while executing (bind (call ?e (run-query collect-sectionless-pages)))
>     while executing defrule fill-section
>     while executing (run).
>   Message: Bad index 2 in call to get() on this vector:  (bind (call ?e
> (run-query collect-sectionless-pages)))
> ...
> 
> The code from the rule looks like this:
> 
>     (bind (?e (run-query collect-sectionless-pages)))
> 
> ...which I copied verbatim out of the user guide.
> 
> There are Page facts in the knowledge base that have nil as their onSection
> slot value.
> 
> I am using Jess 6.0a3.  Is there a mistake in my code?
> 
> > ______________________________________________
> > Matt Bishop - Engineering Manager, UpFront
> > 
> > We're Growing - http://www.scenicsoft.com/jobs 
> 
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
> 



---------------------------------------------------------
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