There seems to be nasty bug in the IDE that keeps a sketch from compiling even though the code in question is commented out.
The sketch at the bottom of this page http://moderndevice.com/AM/Hmwrk1_BlinkLEDs.html won't compile when pasted into either Mac or Windows Arduino IDE. It throws this error
error: expected unqualified-id before 'else' which looks like a bracket, semicolon or parenthesis is out of place. I tried commenting out sections with no success.
Then I pasted the whole thing in below the standard blink sketch - just to get the required setup and loop functions in there, and commented out the entirety of my sketch. Nada - same error. This is really puzzling - commented out code keeps sketch from compiling !?!
Another thing I tried is to comment out the else if statements - no compile. But if I cut out the statements - compiles fine. Whats the story here? Is the compiler confused about something in the comments?
Eventually, by pasting in sections a little at a time, I did get the sketch to compile (without ostensibly changing any code). I'm still looking for specific problem however.
Is this a known bug? Or some evil non-printing character that is new? Or maybe, embarrassingly - I am missing something simple? But why is commented-out code having any effect at all?
The problem with the sketch seems to be below the second else if statement.
I duplicated my results with both the Mac and Windows IDE and with pastes from Firefox and IE.