# Use local variable in another function

**URL:** <https://forum.arduino.cc/t/use-local-variable-in-another-function/880354>\
**Category:** Programming\
**Created:** [July 1, 2021, 1:14am UTC](https://forum.arduino.cc/t/use-local-variable-in-another-function/880354 "2021-07-01T01:14:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [July 1, 2021, 1:21am UTC](https://forum.arduino.cc/t/use-local-variable-in-another-function/880354/2 "2021-07-01T01:21:46Z")

</div>

Hello, do yourself a favour and please read [How to get the best out of this forum](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966) and modify your post accordingly (including code tags and necessary documentation of your ask).

—-

You can’t use a local variable in another function. Make it global or return it or pass that as a parameter

---

_[View the full topic](https://forum.arduino.cc/t/use-local-variable-in-another-function/880354)._
