Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : I need Help

$
0
0
I might have not been clear. it = getItems()[2] does exactly the same thing than lst = getItems(); it = lst[2];
It is not a way to return a single element by a special magic!
It is only a syntactical shortcut.
The second example was another example of shortcut, similar in the sense that the return value is used immediately, without intermediary variable.

Viewing all articles
Browse latest Browse all 1768

Trending Articles