-2

I need to use the logical operator or in this case but I get this syntax error. What is the exactly syntax to write this?

CLIPS> 
(defrule case2
   (or ((PNP Y) (PLF Y) (PIU Y))
       ((PNP Y) (PLF N) (PIU Y)))
   =>
   (printout t "- Check the printer-computer cable" crlf))

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for the first field of a pattern.

ERROR:
(defrule MAIN::case2
   (or  ((
CLIPS> 
Gary Riley
  • 10,130
  • 2
  • 19
  • 34

1 Answers1

0

Any of the following ways are syntactically correct and will produce the same results:

(defrule case2
   (or (and (PNP Y) (PLF Y) (PIU Y))
       (and (PNP Y) (PLF N) (PIU Y)))
   =>
   (printout t "- Check the printer-computer cable" crlf))

(defrule case2
   (PNP Y) 
   (or (PLF Y) 
       (PLF N))
   (PIU Y)
   =>
   (printout t "- Check the printer-computer cable" crlf))

(defrule case2
   (PNP Y) 
   (PLF Y | N)
   (PIU Y)
   =>
   (printout t "- Check the printer-computer cable" crlf))
Gary Riley
  • 10,130
  • 2
  • 19
  • 34