[Solved]Loop Refference page

Hi all, I was just on the Loop reference page: http://arduino.cc/en/Reference/Loop When I tried the code example, I found the code wouldn't compile! So I changed the code to this an it works! Maybe someone should change that page to a working example?

int buttonPin = 3;

// setup initializes serial and the button pin
void setup()
  pinMode(buttonPin, INPUT);

// loop checks the button pin each time,
// and will send serial if it is pressed
void loop()
  if (digitalRead(buttonPin) == HIGH)


I am in version 1.0.1 of Arduino, with an UNO board if that matters. Perhaps the reference page is an old example?

Please post the exact error messages you see (remember to enable verbose compiling).

Sorry, spotted the error:


should be:




should be


Ah, Yeah, Sorry. I know whats wrong with it already. I'm just posting for a fix to the site example, because having working examples is important to me. Is there a better means to do this? Is the forum related to the website in such a way that this example might get fixed?

Playground pages can be edited by registered users. Don't know about reference pages. I guess not... But hopefully some site admin will notice this thread and fix that page. :)

I just realized that the pages on http://arduino.cc/en/Reference/HomePage
are inluded in the source package under: arduino/reference. Except HomePage is index.html.
I checked, and the loop example is wrong there too.
Is that a topic for the webmaster or the source code dev team?

This is an old legacy of the first version of the Arduino language! Fixed, thanks for noticing!