[rules-users] MVEL curly braces position - bug or feature?

nickS nsanders at msxi-euro.com
Fri Jan 6 11:51:16 EST 2012


Hi

I've been learning drools ands I saw that there is a Fibonacci example, so I
thought I'd write my own using mvel as the dialect and then compare it to
the model solution.

However, I couldn't get mine working. It parsed but the behaviour was very
odd. It kept ignoring the modify block in my recurse rule and consequently
it went into an infinite loop. I compared it to the 'approved' solution and
the two were pretty much the same, except that it worked and mine didn't.

After a lot of checking I noticed that I had started my curly brace on a new
line after modify but the example had continued straight after the closing
brace of the modify.

Works //

modify ( f ){
        value = 1
       };

or

 modify ( f ){value = 1 };


Doesn't Work //

modify ( f )
{
      value = 1
 };


Does anyone know if this is a bug or a feature?


--
View this message in context: http://drools.46999.n3.nabble.com/MVEL-curly-braces-position-bug-or-feature-tp3638341p3638341.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list