I want numbers from 1 and greater I tried 1..n, but thi开发者_JS百科s doesn't work So I can't do this in Range?
thanks
1..Integer.MAX_VALUE
or
1..Long.MAX_VALUE
What do you want n to signify ?
This works for me:
def n = 3
def range = 1..n
range.each { println it }
Output:
$ groovy range.groovy
1
2
3
Can you provide a script that isn't behaving as you would like?
精彩评论