Problem with conditional #include

pico:
This is a well documented and well known failing of the Arduino IDE preprocessor. It doesn't respect (or simply ignores) the preprocessor conditionals, and will aggressively match any line starting with #include for a library inclusion.

It's been reported as a problem for years. Like many other problems with the IDE preprocessor, Team Arduino don't think it's a big deal, apparently, so it's not going to be fixed.

Actually, this isn't entirely true, on reflection. The one time that the conditional #include does work is if you say

#if ARDUINO >= 100
#include <Arduino.h>
#else
#include <WProgram.h>
#endif

When I first saw this , I thought "Yay! They finally fixed the IDE preprocessor to respect conditional #include!"

But no. They just fixed it for this one special case for their convenience. The rest of the plebs can just suffer. LOL.

It's "design decisions" like these that earn them the opprobrium amongst serious software developers they so justly deserve. Disgraceful, really.

They did do some important fixes in 0023->1.0, however, like renaming the .pde files to become .ino, and "WProgram.h" to become "Arduino.h". All an exercise in branding, of course. Which shows where their priorities lie, I suppose.

There. My spleen feels a little better now.