digitalWrite(LEDtoBlink, not digitalRead(LEDtoBlink)); //change state of the LED
I saw this on the forum which was posted up by a reputable member. Tried to compile and it compiles. My question is I have never come across the "not" syntax and having done a search on the Arduino language of this site did not find any info. Can someone explain this "not" syntax please
not in C++, which is what the Arduino is programmed in, is equivalent to to the not operator ! which you will find on the Arduino reference page and all over the Web
Don't forget that Arduino include C code as well as C++ code.
The iso646.h file specifically defines them for non-C++ code.
It's not actually included in any Arduino core code (even the actual C modules.)
And it's part of avr-gcc (or gcc in general?), rather than an Arduino addition.