We are considering an ELSE for 3.1 - people are free to create a JIRA for
this, and we can vote on it etc... There are a few options to the behaviour
of else, but basically, on option is in the compile stage to build it into
rules like Geoffrey described (probably lots of other ways).

On 4/8/06, Geoffrey Wiseman <[EMAIL PROTECTED]> wrote:
>
> On 4/7/06, Dmitry Goldenberg <[EMAIL PROTECTED]> wrote:
> >
> > I'm trying to understand how to express conditional logic via DRL.  For
> > example, I have
>
>
> [snip]
>
> I pretty much understand the flow of IF/THEN - how do you do an ELSE?
> >
>
> With multiple rules, for the most part.  For example:
>
> rule "Men Under Twenty"
> when
>     $p : Person( male==true, age<20 )
> then
>     $p.doSomething();
> end
>
> rule "Men Over Twenty and Women"
> when
>     $p : ( Person( male==false ) || Person( age >= 20 ) )
> then
>     $p.doSomething();
> end
>
> --
> Geoffrey Wiseman
>
>

Reply via email to