Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • In the same circumstances, a const will not use more RAM than a #define. And for the analog pins, I would define them as const uint8_t, although const int would make no difference. Commented Mar 26, 2018 at 20:44
  • You wrote “a const doesn't actually use more RAM [...] until it is actually used”. You missed my point: most of the time, a const does not use RAM, even when it is used. Then, “this is a multipass compiler”. Most importantly, it is an optimizing compiler. Whenever possible, constants get optimized into immediate operands. Commented Mar 27, 2018 at 7:26