JESS: Newbie questions

2004-08-03 Thread Mehta, Chirag (IT)
Also, If ?q is a negative number, how do I change it so its positive? i.e |?q| Chirag -Original Message- From: Mehta, Chirag (IT) Sent: 03 August 2004 11:01 To: '[EMAIL PROTECTED]' Subject: JESS: Newbie questions I have another silly beginner question: This is my code: (defrule

JESS: Newbie questions

2004-08-03 Thread Mehta, Chirag (IT)
I have another silly beginner question: This is my code: (defrule equityHedgeMaxLiquidity::calcifnc (declare (auto-focus TRUE)) (productType EQTY) ?b - (Positions (quantity ?q) (cusip ?c) (median_22_day_volume ?m)

Re: JESS: Newbie questions

2004-08-03 Thread ejfried
I think Mehta, Chirag (IT) wrote: Also, If ?q is a negative number, how do I change it so its positive? i.e |?q| Have a look at http://herzberg.ca.sandia.gov/jess/docs/61/function_index.html, which is a list of all the built-in functions in Jess, listed by category. Under the Mathematical

Re: JESS: Newbie questions

2004-08-03 Thread ejfried
I think Mehta, Chirag (IT) wrote: This does not work as (productType EQTY) is incorrect. Don't know what you mean by is incorrect, but I'll guess one of two things: first, you've written this as is there were independent productType facts. Is this the case, or is productType a slot in the

JESS: Newbie questions

2004-08-02 Thread Mehta, Chirag (IT)
Hi all, I am a newbie to jess and have written this code: (defrule calcifnc (bondMVMax (cusip ?c)) (bondMVMax (mv ?mv)) (bondMVMax (issue_outstanding ?io~nil)) 5. (bind ?noncomp (/ ?mv ?io)) (test ( ?noncomp 10)) = (printout t ?c " is Non Complaint nc = " ?noncomp crlf) ) At line 5, it

Re: JESS: Newbie questions

2004-08-02 Thread ejfried
I think Mehta, Chirag (IT) wrote: I cannot seem to figure out what is wrong! The things on the left-hand-side of a rule are always conditional elements (patterns or groups of patterns), not function calls. Jess is trying to interpret (bind ?noncomp (/ ?mv ?io)) as a pattern that matches bind

RE: JESS: Newbie questions

2004-08-02 Thread Mehta, Chirag (IT)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 02 August 2004 15:31 To: [EMAIL PROTECTED] Subject: Re: JESS: Newbie questions I think Mehta, Chirag (IT) wrote: I cannot seem to figure out what is wrong! The things on the left-hand-side

Re: JESS: Newbie questions

2004-08-02 Thread ejfried
To: [EMAIL PROTECTED] Subject: Re: JESS: Newbie questions I think Mehta, Chirag (IT) wrote: I cannot seem to figure out what is wrong! The things on the left-hand-side of a rule are always conditional elements (patterns or groups of patterns), not function calls. Jess is trying

RE: JESS: Newbie questions

2004-08-02 Thread Mehta, Chirag (IT)
PROTECTED] Sent: 02 August 2004 15:31 To: [EMAIL PROTECTED] Subject: Re: JESS: Newbie questions I think Mehta, Chirag (IT) wrote: I cannot seem to figure out what is wrong! The things on the left-hand-side of a rule are always conditional elements (patterns or groups of patterns), not function

Re: JESS: Newbie questions

2004-08-02 Thread ejfried
I think Mehta, Chirag (IT) wrote: Thank you ever so much. One more quick question. In my rule I have calculated the following: (/ ?mv ?io) Is there anyway to save this along with the Fact reference in ?b ?? Sure -- the same way you might do it in Java, by using a little class to