I'm not sure if this is a bug or even sure of how to describe it. If you place your cursor after a bracket it will show you its matching bracket (if there is one) with a blue box around it. However, if you have a situation as shown below with a bracket commented out (for whatever reason) the IDE apparently still "sees" it. The compiler doesn't. This is the Blink code slightly modified.
void loop()
{
digitalWrite(ledPin, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // set the LED off
delay(1000); // wait for a second
// Serial.println("Hello"); } // Cursor after bracket
}
I think you've described it pretty well; I would be willing to bet this is a Processing related bug in the IDE, since you mention that the compiler treats it properly (which it should!).
Have you looked over in the Processing forums (or whatever they use; I've never actually checked) to see if they are aware of the bug (or if it is a bug there)? Something to look into...
I would be willing to bet this is a Processing related bug in the IDE...
Hi cr0sh,
You nailed it. I went to the Processing bug search engine at http://dev.processing.org/bugs/search.cgi , typed in 'bracket' and it turns out to be a documented bug since 2005!!
i use notepad++ for writing script then paste them into IDE just because i like notepad++ more clear on the brackets and stuff like that maybe i'll write a plugin to reconize the commands and stuff like that.
ik don't like IDE because of its layout and that is java and sometimes Way to slow.