I know nowadays in C++ programming, using #define macros to define a constant is generally frowned upon, and the strong preference is to use constants.
Is there any reason in an Arduino library why a #define Macro may be better, faster, or more efficient than a constant?
If it matters, I am talking about unsigned short ints, or short ints.
NJavrGuy:
Is there any reason in an Arduino library why a #define Macro may be better, faster, or more efficient than a constant?
None that I can see, except when the code was written by somebody who has a personal preference for using #defines because that's what they are used to using.
A "#define" could be overwritten without error.
A "const int" can not be overwritten with a different value.
And the compiled sketch has the same size.