What's that "for i, val : list: ..." syntax? -



What's that "for i, val : list: ..." syntax? -

i remember that syntax existed in language! for i, val : list {...} {int = 0; val : list {...; i++;}}, language that?

this exact syntax unknown (and won't work in language). can offer be

java iterators:

for(string : new string[]{"one", "two"}) print(i);

c foreach macro

for_each_item(i, processes) { i->wakeup(); }

javascript foreach:

for each (var property in obj) { print(property); }

syntax

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -