JESS: CE can't be bound to a variable

"Donald Winston" <[email protected]>
Newsgroups gmane.comp.java.jess
Message-ID <20545_1284299980_o8CDwsE7022290_338721.82730.qm@web30107.mail.mud.yahoo.com>
I got the following rule to work:

(defrule validate-contactInfo-street "validate contactInfo's street"
?fact <- (contactInfo {street == "" && pob == "" || street != "" && pob != 
""})  
=>
(modify ?fact (streetError "street xor po box is required")))


But I can't get the "old style" version of this to work. I don't know why.

(defrule validate2-contactInfo-street "validate contactInfo's street"
?fact <- (or (and (contactInfo (street ""))  
                                    (contactInfo (pob "")))
                           (and (contactInfo (street ~"")) 
                                    (contactInfo (pob ~""))))  
=>
(modify ?fact (streetError "street xor po box is required")))

It says CE can't be bound to a variable. The ((( )))) look ok to me.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.