Integral Type Ranges

suggest change

Integral type ranges ( IntRange , LongRange , CharRange ) have an extra feature: they can be iterated over. The compiler takes care of converting this analogously to Java’s indexed for-loop, without extra overhead

for (i in 1..4) print(i) // prints "1234"
for (i in 4..1) print(i) // prints nothing

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents