[PRNTUTIL2] Syntax Error: Check appropriate syntax for defrule

1,320 views
Skip to first unread message

Aquiles Mariani

unread,
Sep 5, 2013, 9:26:53 AM9/5/13
to clip...@googlegroups.com
Hi, i get this error trying to do this:

Defining defrule: ValidarEspesor_B01
[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defrule.

ERROR:
(defrule MAIN::ValidarEspesor_B01
(declare (salience 10) (CF 1.000))
(_v (
Defining defrule: ValidarEspesor_B00
[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defrule.

ERROR:
(defrule MAIN::ValidarEspesor_B00
(declare (salience 10) (CF 1.000))
(_v (
FALSE

The piece of code is:
*********************************************************************************************************
(defrule ValidarEspesor_B01
(declare (salience 10) (CF 1.00) )
(_v (_e espesorLFrio ?espesorLFrio ) (_t ?t_t_espesorLFrio ?t_o_espesorLFrio))
(test (> ?espesorLFrio 3.0))
=>
(bind ?targetfin 0)
(assert (_v (_e targetfin ?targetfin )))
(bind ?espesorLFrio 3.0)
(assert (_v (_e espesorLFrio ?espesorLFrio )))
(bind ?INICIALIZADO SI)
(assert (_v (_e INICIALIZADO ?INICIALIZADO )))
(Printmsj CON  "espesor mayor a 3mm")
(Printmsj VIS  "espesor mayor a 3mm")

(loggmsj /home/setri/MF_target/tmp/clp/ "REGLA_ValidarEspesor_B01" crlf)
(loggmsj /home/setri/MF_target/tmp/clp/ "espesorLFrio: "?espesorLFrio crlf )
(loggmsj /home/setri/MF_target/tmp/clp/ "targetfin: "?targetfin crlf )
(loggmsj /home/setri/MF_target/tmp/clp/ "INICIALIZADO: "?INICIALIZADO crlf )
)

(defrule ValidarEspesor_B00
(declare (salience 10) (CF 1.00) )
(_v (_e espesorLFrio ?espesorLFrio ) (_t ?t_t_espesorLFrio ?t_o_espesorLFrio))
(not (test (> ?espesorLFrio 3.0))
)=>
(bind ?targetfin 0)
(assert (_v (_e targetfin ?targetfin )))
(bind ?INICIALIZADO SI)
(assert (_v (_e INICIALIZADO ?INICIALIZADO )))
(Printmsj CON  "espesor menor a 3mm")
(Printmsj VIS  "espesor menor a 3mm")

(loggmsj /home/setri/MF_target/tmp/clp/ "REGLA_ValidarEspesor_B00" crlf)
(loggmsj /home/setri/MF_target/tmp/clp/ "espesorLFrio: "?espesorLFrio crlf )
(loggmsj /home/setri/MF_target/tmp/clp/ "targetfin: "?targetfin crlf )
(loggmsj /home/setri/MF_target/tmp/clp/ "INICIALIZADO: "?INICIALIZADO crlf )
)

***************************************************************************************************************

I hope you can help me and i will be very grateful.

CLIPS Support

unread,
Sep 5, 2013, 12:14:07 PM9/5/13
to clip...@googlegroups.com
Verify that the deftemplate for _v is defined:

CLIPS> 
(defrule ValidarEspesor_B01
   (declare (salience 10))
   (_v (_e espesorLFrio ?espesorLFrio ) (_t ?t_t_espesorLFrio ?t_o_espesorLFrio))
   (test (> ?espesorLFrio 3.0))
   =>)

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defrule.

ERROR:
(defrule MAIN::ValidarEspesor_B01
   (declare (salience 10))
   (_v (
CLIPS> (deftemplate _v (multislot _e) (multislot _t))
CLIPS> 
(defrule ValidarEspesor_B01
   (declare (salience 10))
   (_v (_e espesorLFrio ?espesorLFrio ) (_t ?t_t_espesorLFrio ?t_o_espesorLFrio))
   (test (> ?espesorLFrio 3.0))
   =>)
CLIPS> 

Aquiles Mariani

unread,
Sep 5, 2013, 2:16:21 PM9/5/13
to clip...@googlegroups.com
It worked, this happens because i'm new at this CLIPS thing and i have newbie mistakes.
Thank you a lot!
Reply all
Reply to author
Forward
0 new messages