DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10974>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10974 Break / return statement Summary: Break / return statement Product: Velocity Version: 1.3-rc1 Platform: Sun OS/Version: All Status: NEW Severity: Major Priority: Other Component: Testing AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Please answer this as soon as possible: how do i break from a loop / return a value from a macro based on some condition Please have a look at this code #macro ( countTabbedSection $position ) position = $position #set ($loopend = $alSections.size() - 1) #foreach ($count in [$position..$loopend]) #set( $sectiondataobject = $alSections.get($count) ) #if ($sectiondataobject.getIsTabbed()==1) sectiondataobject.getIsTabbed() = $sectiondataobject.getIsTabbed() #else ## i want to break this loop here #end #end #end ## end of macro #set( $count = 0 ) #foreach ($sectiondataobject in $alSections) #countTabbedSection( $count ) #set( $count=$count+1 ) #end Thanks -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
