Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-5
-
None
-
None
Description
The first groovy example on the QuickStart page http://groovy.codehaus.org/Quick+Start is:
//hello.groovy
println "hello, world"for (arg in this.args ) {
println "Argument:" + arg;
}
// this is a comment
/* this is a comment for block.you can do like thisthis.args.each{ arg ->
println "hello, ${arg}"
}
*/
This did not work for me. The correct sytax would be:
println "hello, world"
for (arg in this.args) {
println "Argument: " + arg;
}
Note that this might be the very first example some tries out on groovy.
Secondly, the helloworld example piggybacks some information about comments too. This is confusing because the comments have incorrect syntax highlighting - for, this etc turn up in different colours within the comment.
Attachments
Attachments
Issue Links
- duplicates
-
GROOVY-1332 correct missing spaces in the groovy examples on confluence
- Closed