|
RE: standard for loop: msg#00194lang.groovy.user
You can do something cheeky like: for (i in 0...foo.size()) { println i } Dion -----Original Message----- From: Scott Stirling [mailto:scottstirling-KealBaEQdz4@xxxxxxxxxxxxxxxx] Sent: Monday, November 29, 2004 11:17 PM To: groovy user Subject: [groovy-user] 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> |
|---|---|---|
| Previous by Date: | standard for loop, Scott Stirling |
|---|---|
| Next by Date: | Re: standard for loop, Ken Pelletier |
| Previous by Thread: | standard for loop, Scott Stirling |
| Next by Thread: | RE: standard for loop, Steven Buroff |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |