logo       

standard for loop: msg#00193

lang.groovy.user

Subject: standard for loop

Hi,

Is there a Groovy idiom (with a counter) to use instead of a standard 'for' loop? I need to use the counter from the loop iterations.

I get this exception when I code a standard 'for' loop (i.e., for (int i =0; i < foo.size(); i++):

Exception in thread "main" NOT YET IMPLEMENTED: standard for loop
at org.codehaus.groovy.syntax.parser.ASTBuilder.forStatement(ASTBuilder.jav a:1026)
at org.codehaus.groovy.syntax.parser.ASTBuilder.statement(ASTBuilder.java: 773)
at org.codehaus.groovy.syntax.parser.ASTBuilder.topLevelStatement(ASTBuilde r.java:327)
at org.codehaus.groovy.syntax.parser.ASTBuilder.build(ASTBuilder.java:198)
at org.codehaus.groovy.control.SourceUnit.convert(SourceUnit.java:339)

Thank you,
Scott Stirling
Framingham, MA




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise