Wikipedia said:...'const' in the C family of languages differs from similar constructs in other languages in being part of the type, and thus has complicated behavior when combined with pointers, references, composite data types, and type-checking.
This isn't the case. The compiler will optimize the constant value into the code without reserving memory for it.I think the advantage for #define is no memory cost.
That's good to know.This isn't the case. The compiler will optimize the constant value into the code without reserving memory for it.
I don't remember ever using these pin definitions aside from in various mode()/read()/write() functions, so I don't see much possibility for unsafe usage.The compiler will use the type information for the constant to flag any cases where you might be using mismatched types unsafely.