I think Mitch Christensen wrote:

> 
> A bit off topic, but I get a "variable not bound" exception if I use a
> variable in the pattern to replace the hard-coded '50' and '100' values.  Is
> it illegal to reference a bound variable in a pattern?  (offending code
> snippet below...)
> 


Have a look at the section entitled "Global variables" starting on
page 48 of "Jess in Action." Short answer: variables defined at the
top-level prompt aren't "global", they're just "top-level" and they're
not accessible from rules. You can and should use "defglobals" for
what you want to do; this section of JIA described how.

(Oh, joy, this is the first time I've answered a FAQ with a page
reference to JIA...)





---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

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