Not understanding the code of Zoetrope project in Arduino starter's kit (proj 10)

I encountered this confusion before in the digital hour glass project where something is declared and named and then given a value or command without declaring a specific syntax before. Here, they declared: int motorEnabled = 0; // Turns the motor on/off int motorSpeed = 0; // speed of the motor int motorDirection = 1; // current direction of the motor Then in the loop we have this block of code: if (onOffSwitchState != previousOnOffSwitchState) { // change the value of motorEnabled if pressed if (onOffSwitchState == HIGH) { [u]motorEnabled = !motorEnabled;[/u] } } See the problem is that there was no special syntax before "motorEnabled" so the arduino understands what the name stands for exactly. This is my confusion and all the times i was confused it was in similar cases. I hope someone understands and could help me understand what is really going on. Thank you, Hadi Hissi.

Updated: I also remembered that when we have "onOffSwitchState != previousOnOffSwitchState" how can the arduino detect what is the "previousOnOffSwitchState"

"int motor enabled = 0;" says "I want the compiler to reserve me some memory that I'm going to call "motorEnabled" from now on, and give it the value zero". After that, I don't want to reserve any more memory with that name, so I can just assign to it as I wish.

Edit I just found an identical copy of this question in a different part of the forum, which I deleted because that's called cross posting.

It's called cross-posting because it makes me very very cross, because it WASTES TIME.

HadiHissi: See the problem is that there was no special syntax before "motorEnabled" so the arduino understands what the name stands for exactly.

The names have meaning only to the programmer. They have no meaning to the Arduino. Every name you see is either a 'keyword' built into the compiler (like 'int' and 'if') or an 'identifier' that you or some other programmer has defined somewhere (like 'motorEnabled' or 'onOffSwitchState').

HadiHissi: Updated: I also remembered that when we have "onOffSwitchState != previousOnOffSwitchState" how can the arduino detect what is the "previousOnOffSwitchState"

It is up to the programmer (that's you) to put the right value in that variable at the right time. If you don't do it, it won't contain the right value. Look in the sketch to see where that gets set.