Skip to main content
Arduino

Return to Answer

replaced http://arduino.stackexchange.com/ with https://arduino.stackexchange.com/
Source Link

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? 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

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

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

Source Link
Nick Gammon
  • 38.9k
  • 13
  • 69
  • 125

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

AltStyle によって変換されたページ (->オリジナル) /