Keep in mind that if/elsif/.../elsif implies a certain order for
evaluating the conditions. Patterns in different rules are evaluated
concurrently. The upshoot of this is that for a complete (i.e., with
else) n-way if/elsif such as, e.g.,

if( c1 ) then a1 elsif( c2 ) then a2 else a3

the execution of a3 has the guard g3 = ( ! c1 && ! c2 )
the execution of a2 has the guard g2 = ( ! c1 && c2 )
the execution of a1 has the guard g1 = (c1)

For any two of the guards gi != gj the following must hold
   gi && gj == false

And for all guards g1,... gn you must have
   g1 || g2 || ... || gn == true

-W


On Wed, Dec 10, 2008 at 5:47 AM, hansari <[EMAIL PROTECTED]> wrote:
>
> I need rule for
>
> if (condtion1)
>  then (acton1)
> if else (conditon2)
> then   (action2)
> if else (condition3)
> then (action3)
> else (acton4)
>
> how can perform this by using defrule
> please help me.
>
> thank you.
> --
> View this message in context: 
> http://www.nabble.com/how-to-write-If-else-rule-tp20929177p20929177.html
> Sent from the Jess mailing list archive at Nabble.com.
>
>
>
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> (use your own address!) List problems? Notify [EMAIL PROTECTED]
> --------------------------------------------------------------------
>
>


--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to