To save Ernest the trouble, I'll just paste in his response to my identical
question back in October...

This is a known bu... ah, "idiosyncrasy" of Jess that I've mentioned
here before. To access a defglobal on the LHS of a rule, you need to
use the (get-var) function :

(test (call (get-var *NodeClass*) isInstance ?node))


At 03:07 PM 1/29/99 -0500, you wrote:
>
>This may be a 'oops' question (possibly a 'duh':-), but I am having a
>problem referring to a global variable in a pattern.
>I am using Jess 5.0a2.
>
>A rule like:
>(defrule global-test
>  (foo ?b&:(> ?b ?*my-global*))
>  =>
>  (printout t "bigger than my global." crlf))
>
>with 
>(defglobal ?*my-global* = 5)
>
>Yields the parse error:
>"Unbound variable found in funcall: *my-global*"
>
>Am I missing a bit of syntax, are references to globals not allowed in the
>LHS, or is this a bug?
>
>Thanks in advance,
>Andy
>
> <<Doyle, Andy (E-mail).vcf>> 
>Content-Type: application/octet-stream;
>       name="Doyle, Andy (E-mail).vcf"
>Content-Disposition: attachment;
>       filename="Doyle, Andy (E-mail).vcf"
>Content-Location: ATT-0-33FBE202B2B7D211879A00805F6572B0-D
>       OYLE_%7E2.VCF
>
>Attachment Converted: C:\Eudora\Attach\Doyle, Andy (E-mail).vcf
>

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to