You can create the same effect using<br>   while(...)<br>   {}<br>or<br>   do<br>  {} while( ... );<br>or<br>   for(;;)<br>   {}<br><br>You can&#39;t do  it with switch(){} because that&#39;s not accepted at all.<br><br>-W<br>
<br><div class="gmail_quote">2012/1/6 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:ed.tirelli@gmail.com">ed.tirelli@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204,204,204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<div><br></div>   Looks like a bug. MVEL does ; injection in order to make ; optional, so my guess is that it is mistakenly injecting ; after your modify() call and handling {} as a separate code block.<div><br></div><div>

   Edson<div><div class="h5"><br><br><div class="gmail_quote">On Fri, Jan 6, 2012 at 11:51 AM, nickS <span dir="ltr">&lt;<a href="mailto:nsanders@msxi-euro.com" target="_blank">nsanders@msxi-euro.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204,204,204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Hi<br>
<br>
I&#39;ve been learning drools ands I saw that there is a Fibonacci example, so I<br>
thought I&#39;d write my own using mvel as the dialect and then compare it to<br>
the model solution.<br>
<br>
However, I couldn&#39;t get mine working. It parsed but the behaviour was very<br>
odd. It kept ignoring the modify block in my recurse rule and consequently<br>
it went into an infinite loop. I compared it to the &#39;approved&#39; solution and<br>
the two were pretty much the same, except that it worked and mine didn&#39;t.<br>
<br>
After a lot of checking I noticed that I had started my curly brace on a new<br>
line after modify but the example had continued straight after the closing<br>
brace of the modify.<br>
<br>
Works //<br>
<br>
modify ( f ){<br>
        value = 1<br>
       };<br>
<br>
or<br>
<br>
 modify ( f ){value = 1 };<br>
<br>
<br>
Doesn&#39;t Work //<br>
<br>
modify ( f )<br>
{<br>
      value = 1<br>
 };<br>
<br>
<br>
Does anyone know if this is a bug or a feature?<br>
<span><font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/MVEL-curly-braces-position-bug-or-feature-tp3638341p3638341.html" target="_blank">http://drools.46999.n3.nabble.com/MVEL-curly-braces-position-bug-or-feature-tp3638341p3638341.html</a><br>


Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>

</font></span></div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>