a simple one --   for in

I came across this last night and was wondering..
can the arduino IDE use for in loops? I looked in the docs and tried how I would normally write it, but it gave errors.

ex
int list[] ={1,2,3,4,5};
int thing;

for (thing in list)
{
..do stuff to the list
}

I understand it can be done with a normal for loop , but I was just curious as some times they are a bit cleaner.

thanks

Nick

Nope, no for in loops - this ain't perl. :slight_smile:

for in isn't standard C, either, unless something changed while I wasn't looking.

-j

that's fair enough...

thanks for the info