# \#define versus const byte

**URL:** <https://forum.arduino.cc/t/define-versus-const-byte/1202297>\
**Category:** Programming\
**Created:** [December 20, 2023, 4:01pm UTC](https://forum.arduino.cc/t/define-versus-const-byte/1202297 "2023-12-20T16:01:23Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Dr\_Quark](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dr_quark/32/216619_2.png) [@Dr\_Quark](https://forum.arduino.cc/u/Dr_Quark)\
**Post date:** [December 22, 2023, 1:04am UTC](https://forum.arduino.cc/t/define-versus-const-byte/1202297/35 "2023-12-22T01:04:51Z")

</div>

What fun to read all your comments. What I distill out of them is that the compiler already figured out it didn't need to dedicate RAM to my constants. So "const" and "#define," when it comes to integers, makes no difference and, therefore, the dynamic memory allocation did not change when using one or the other.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [June 19, 2024, 1:45am UTC](https://forum.arduino.cc/t/define-versus-const-byte/1202297/37 "2024-06-19T01:45:26Z")

</div>

Closed on June 19, 2024, 1:45am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

[Previous page](https://forum.arduino.cc/t/define-versus-const-byte/1202297.md?page=1)
