Good Evening All,
I'm attempting my first Jess script tonight and need a little help. I'm trying to create a new variable (see Problem Line below) by combining ?ostring and ?answer. When I (run) this batch file I receive a Jess error (see below).
How do you combine to variables such as ?ostring and ?answer ?
TIA
--------------------------- Script Snippet ----------------------------
(deftemplate work-surface
(slot shape (default rectangular))
(slot product-line (default not-defined))
(slot order-string (default Z))
(slot shape-code (default R))
(slot top-material (default not-defined))
(slot front-edge (default not-defined))
(slot question-to-ask (default product-line))
)
(defrule rectangular-work-surface-front-edge-laminate "For top material Laminate"
(vocabulary (product work-surface))
?ws <- (work-surface (shape rectangular) (order-string ?ostring) (question-to-ask ?question) (top-material l))
(test (eq ?question front-edge))
=>
(printout t crlf "Select Front Edge Material" crlf)
(printout t "===================" crlf)
(printout t "A - Square-Edge Front, Vinyl" crlf)
(printout t "C - Square-Edge Front, Wood" crlf)
(printout t "D - Bullnose Front, Laminate" crlf)
(printout t "E - Bullnose Front, Wood" crlf)
(printout t "F - Bullnose Front, Vinyl" crlf)
(printout t "G - Passage Edge Front, Vinyl" crlf)
(printout t "K - Contoured Edge Front, Vinyl" crlf)
(printout t "" crlf)
(bind ?answer (read))
(modify ?ws (top-material ?answer) (question-to-ask nil))
(bind ?combinded-ostring (+ ?ostring ?answer)) <<<<<<< ------------------------ Problem Line
)
--------------------------- Error Snippet ------------------------------
Jess reported an error in routine Value.numericValue
.......
Message: Not a number: "Z" (type = ATOM).
Program text: ( batch /jess61p4/jimsjess/firstone.clp )
.....
Jim Van Dragt
Herman Miller Inc.
(616) 654-5285
- JESS: Subrules Judson, Ross
- RE: JESS: Subrules James Owen
- Re: JESS: Subrules ejfried
- JESS: Re: Subrules Rich Halsey
- Re: JESS: Re: Subrules ejfried
- Re: JESS: Re: Subrules Rich Halsey
- Re: JESS: Re: Subrules Rich Halsey
- JESS: Corrected version of parametric, polymorph... Rich Halsey
- RE: JESS: Subrules Jim VanDragt
- RE: JESS: Subrules Judson, Ross
