I wrote a function that takes characters and noticed that the Arduino Compiler treated some characters like system-reserved, and other like functions, and a few just like characters. Lowercase doesn't seem to be effected. I'm just wondering why.
closed as unclear what you're asking by Chris Stratton, SDsolar, Michel Keijzers, Enric Blanco, Avamander Jul 19 '17 at 13:09
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
In WString.h is a define:
#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))
In other words, the letter
F is already a macro.
I don't know what your code:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
is supposed to do. I suppose you are just testing the syntax highlighting?
The syntax highlighting is designed to try to "help" you by colouring words in a pre-supplied file in a different way. It doesn't in any way affect how the compilation works. And, judging by what you posted, it can't always be relied upon. Personally, I ignore it.
The Arduino IDE does keyword coloration according to a very crude system. It simply scans for all the keywords.txt files included with:
- Arduino IDE
- Libraries bundled with the Arduino IDE
- Libraries you have installed to the libraries subfolder of your sketchbook
- Libraries bundled with the hardware package of the currently selected board - Hardware package of the currently selected board (recent IDE versions only)
There are several types of keyword identifiers that determine which color is used. The reason those letters are colored in your IDE is because some library you have installed just happens to have added them to its keywords.txt file. The Arduino IDE makes no attempt to determine whether you have included those libraries and so coloration doesn't necessarily mean they are "reserved". If you have not included the library that defines a specific keyword then the coloration of that keyword is meaningless.
For more information on keywords.txt see: