user6770: Behold this insanity:
enum WhatArduinoIs {
  Easy, But, Insane, Obsolete, And, Far, Worse, Than, mBed
};

void TellMe(WhatArduinoIs pls) { }

void setup() { }
void loop() { }

I'm pretty good at C++, so I'm fairly sure that should compile. However I get this error:
sketch_jan21b.ino:3:13: error: variable or field 'TellMe' declared void
sketch_jan21b.ino:3:13: error: 'WhatArduinoIs' was not declared in this scope
Error compiling.

I've encountered the Arduino "IDE"'s propensity for insane and totally unrobust modification of programs before. Specifically when you #include libraries Arduino only magically adds the relevant C++ files if the #include is in your main sketch. #include <LiquidCrystal.h> in another C++ file? Link errors.
I suspect in this case it is Arduino magically trying to add function declarations to the start of the file so their order doesn't matter. I.e. it turns the file into this:
void TellMe(WhatArduinoIs pls);

enum WhatArduinoIs {
  Easy, But, Insane, Obsolete, And, Far, Worse, Than, mBed
};

void TellMe(WhatArduinoIs pls) { }

void setup() { }
void loop() { }

That obviously doesn't work. How can I tell Arduino to leave my damn program alone?

user10794: All you need is a function prototype. I have a detailed explanation at Classes and objects: how many and which file types I actually need to use them?
So, this compiles:
enum WhatArduinoIs {
  Easy, But, Insane, Obsolete, And, Far, Worse, Than, mBed
};

void TellMe(WhatArduinoIs pls);  // prototype
void TellMe(WhatArduinoIs pls) 
  {
  }
void setup() { }
void loop() { }

Off-site reference: How to avoid the quirks of the IDE sketch file pre-preprocessing

user1585: You seem to be correct about what the arduino IDE is doing to your sketch.
Arduino will not preprocess any .h or .cpp files, so you could use a second file. you could also break the IDE's function locating regex with a dummy throw() statement like this:
void TellMe(WhatArduinoIs pls) throw() { }

The dummy throw allows it to compile for me on 1.5.8

user42: You can workaround the issue by putting your enum and function into a namespace. You can even take advantage of C++ unnamed namespaces if you like:
namespace
{
  enum WhatArduinoIs {
    Easy, But, Insane, Obsolete, And, Far, Worse, Than, mBed
  };

  void TellMe(WhatArduinoIs pls) { }
}

void setup() { }
void loop() { }

It's annoying (as are many things in the Arduino IDE), but it seems to work.
If you're more experienced with programming then you might want to consider using a 3rd party IDE with an Arduino plugin, such as Eclipse. The Arduino IDE is really only designed for beginners.

6770: <p>Behold this insanity:</p>

<pre><code>enum WhatArduinoIs {
  Easy, But, Insane, Obsolete, And, Far, Worse, Than, mBed
};

void TellMe(WhatArduinoIs pls) { }

void setup() { }
void loop() { }
</code></pre>

<p>I'm pretty good at C++, so I'm fairly sure that should compile. However I get this error:</p>

<pre><code>sketch_jan21b.ino:3:13: error: variable or field 'TellMe' declared void
sketch_jan21b.ino:3:13: error: 'WhatArduinoIs' was not declared in this scope
Error compiling.
</code></pre>

<p>I've encountered the Arduino "IDE"'s propensity for insane and totally unrobust modification of programs before. Specifically when you <code>#include</code> libraries Arduino only magically adds the relevant C++ files if the <code>#include</code> is in your main sketch. <code>#include &lt;LiquidCrystal.h&gt;</code> in another C++ file? Link errors.</p>

<p>I suspect in this case it is Arduino magically trying to add function declarations to the start of the file so their order doesn't matter. I.e. it turns the file into this:</p>

<pre><code>void TellMe(WhatArduinoIs pls);

enum WhatArduinoIs {
  Easy, But, Insane, Obsolete, And, Far, Worse, Than, mBed
};

void TellMe(WhatArduinoIs pls) { }

void setup() { }
void loop() { }
</code></pre>

<p>That obviously doesn't work. How can I tell Arduino to leave my damn program alone?</p>
 10794: <p><strong>All</strong> you need is a function prototype. I have a detailed explanation at <a href="https://arduino.stackexchange.com/questions/13178/classes-and-objects-how-many-and-which-file-types-i-actually-need-to-use-them">Classes and objects: how many and which file types I actually need to use them?</a></p>

<p>So, this compiles:</p>

<pre><code>enum WhatArduinoIs {
  Easy, But, Insane, Obsolete, And, Far, Worse, Than, mBed
};

void TellMe(WhatArduinoIs pls);  // prototype
void TellMe(WhatArduinoIs pls) 
  {
  }
void setup() { }
void loop() { }
</code></pre>

<p>Off-site reference: <a href="http://www.gammon.com.au/forum/?id=12625" rel="nofollow noreferrer">How to avoid the quirks of the IDE sketch file pre-preprocessing</a></p>
 1585: <p>You seem to be correct about what the arduino IDE is doing to your sketch.</p>

<p>Arduino will not preprocess any .h or .cpp files, so you could use a second file. you could also break the IDE's function locating regex with a dummy <code>throw()</code> statement like this:</p>

<pre><code>void TellMe(WhatArduinoIs pls) throw() { }
</code></pre>

<p>The dummy throw allows it to compile for me on 1.5.8</p>
 42: <p>You can workaround the issue by putting your <code>enum</code> and function into a namespace. You can even take advantage of C++ unnamed namespaces if you like:</p>

<pre><code>namespace
{
  enum WhatArduinoIs {
    Easy, But, Insane, Obsolete, And, Far, Worse, Than, mBed
  };

  void TellMe(WhatArduinoIs pls) { }
}

void setup() { }
void loop() { }
</code></pre>

<p>It's annoying (as are many things in the Arduino IDE), but it seems to work.</p>

<p>If you're more experienced with programming then you might want to consider using a 3rd party IDE with an Arduino plugin, such as Eclipse. The Arduino IDE is really only designed for beginners.</p>
