I am new to Jess and curious as to the ppdefrule output for my gps1
rule below.  The line containing the 'or' conditional results in
only the first expression being output by ppdefrule.  I imagine I am
using the 'or' conditional incorrectly.  Putting the 'or' conditional
inside a 'test' conditional works for my problem.  I am using Jess 6.0.

(deftemplate tpf
    (slot id)
    (slot ls))

(deftemplate suf
    (slot id)
    (slot cu)
    (slot nu))

(defrule gps1
    (tpf (id ?tpf-id) (ls G))
    (suf
        (id ?tid&:(eq ?tid ?tpf-id))
        (cu ?c)
        (nu ?n))
    (or (> ?c 65) (> ?n 75))
=>
    (printout t "Fired gps1 for " ?tid crlf))

(defrule gps2
    (tpf (id ?tpf-id) (ls G))
    (suf
        (id ?tid&:(eq ?tid ?tpf-id))
        (cu ?c)
        (nu ?n))
    (test (or (> ?c 65) (> ?n 75)))
=>
    (printout t "Fired gps2 for " ?tid crlf))

The ppdefrule output for gps1 is:

"(defrule MAIN::gps1
   (MAIN::tpf (id ?tpf-id) (ls G))
   (MAIN::suf (id ?tid&:(eq ?tid ?tpf-id)) (cu ?c) (nu ?n))
   (MAIN::> ?c 65)
   =>
   (printout t \"Fired gps1 for \" ?tid crlf))"

The ppdefrule output for gps2 is:

"(defrule MAIN::gps2
   (MAIN::tpf (id ?tpf-id) (ls G))
   (MAIN::suf (id ?tid&:(eq ?tid ?tpf-id)) (cu ?c) (nu ?n))
   (test (or (> ?c 65) (> ?n 75)))
   =>
   (printout t \"Fired gps2 for \" ?tid crlf))"


_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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