Simple program won't compile

this is my 2nd arduino project. Can’t get it to compile. I get the “error compiling” message at the bottom when I verify, but no other info. Have checked and double checked parenthesis and semi colons, but am missing something. anyone want to take a look?

//make 3 LED blink differently depending on state of button

int red = 5;
int yellow = 4;
int blue = 3;
int button = 2;
int buttonState = 0;

void setup() {
// put your setup code here, to run once:
pinMode(button = INPUT);
pinMode(red = OUTPUT);
pinMode(yellow = OUTPUT);
pinMode(blue = OUTPUT);

}

void loop() {
buttonState = digitalRead(button);
if (buttonState == HIGH) {

digitalWrite(red = HIGH);
digitalWrite(yellow = LOW);
digitalWrite(blue = LOW);
}
else {
digitalWrite(yellow = HIGH);
digitalWrite(red = HIGH);
digitalWrite(blue = HIGH);
}
}

pinMode(button = INPUT);
digitalWrite(red = HIGH);

Have another look at your first Arduino project - compare and contrast.

Please get used to posting code inside code tags.

https://www.arduino.cc/en/Reference/PinMode

https://www.arduino.cc/en/Reference/DigitalWrite

got it, comma not “=”. Thanks guys

Try this
Use "find..." and into "Find " enter just space=space ( real space not the word space )
and into "Replace with " enter just space,space
and use
"Replace all".

Unfortunately there is no way to replace just selected block of code, at least I have not found one.
So you need to replace the commas in definitions , back to = .
Compile and fix some other error(s) if they show up.
Have fun.

Or just cut and paste what I partially correccted, Ha Ha

From this , original

oohrish:
this is my 2nd arduino project. Can't get it to compile. I get the "error compiling" message at the bottom when I verify, but no other info. Have checked and double checked parenthesis and semi colons, but am missing something. anyone want to take a look?

//make 3 LED blink differently depending on state of button

int red = 5;
int yellow = 4;
int blue = 3;
int button = 2;
int buttonState = 0;

void setup() {
// put your setup code here, to run once:
pinMode(button = INPUT);
pinMode(red = OUTPUT);
pinMode(yellow = OUTPUT);
pinMode(blue = OUTPUT);

}

void loop() {
buttonState = digitalRead(button);
if (buttonState == HIGH) {

digitalWrite(red = HIGH);
digitalWrite(yellow = LOW);
digitalWrite(blue = LOW);
}
else {
digitalWrite(yellow = HIGH);
digitalWrite(red = HIGH);
digitalWrite(blue = HIGH);
}
}

To this , partially fixed using find / replace all

//make 3 LED blink differently depending on state of button

int red, 5;
int yellow, 4;
int blue, 3;
int button, 2;
int buttonState, 0;

void setup() {
  // put your setup code here, to run once:
pinMode(button, INPUT);
pinMode(red, OUTPUT);
pinMode(yellow, OUTPUT);
pinMode(blue, OUTPUT);

}

void loop() {
  buttonState, digitalRead(button);
  if (buttonState == HIGH)  {
   
  digitalWrite(red, HIGH);
  digitalWrite(yellow, LOW);
  digitalWrite(blue, LOW);
}
  else {
  digitalWrite(yellow, HIGH);
  digitalWrite(red, HIGH);
  digitalWrite(blue, HIGH);
}
}