|
|
|
|
|
by ohgodplsno
1017 days ago
|
|
Just like every language that implicitly names the current value of the iterator: - It's the innermost iterator that takes priority - You are encouraged to name your iterators if you do so (for particles { part -> part.velocity } ) - Compiler throws warnings if you shadowed names. |
|
Oh, i didn't know that there are any.
It would be a good idea to add the naming explicitly to the Wiki entry of loops: https://jai.community/t/loops/147, I've just found it buried in the `remove` section.
Btw. in for-loops the colon `:` is used inconsistently again, this time for naming the iterator (`foo` in this example:) `for foo: VALUES { ... }`.