# Macros vs. Functions with @eval(return )

**URL:** <https://discourse.julialang.org/t/macros-vs-functions-with-eval-return/26247>\
**Category:** General Usage\
**Tags:** macros, metaprogramming\
**Created:** [July 11, 2019, 11:12am UTC](https://discourse.julialang.org/t/macros-vs-functions-with-eval-return/26247 "2019-07-11T11:12:47Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [July 11, 2019, 1:34pm UTC](https://discourse.julialang.org/t/macros-vs-functions-with-eval-return/26247/6 "2019-07-11T13:34:43Z")

</div>

This form of function calling eval at the end is almost certainly not doing what you want it to, especially if you have a return statement inside do the eval call. Eval is always global in Julia so you are calling return in global scope, which doesn’t make sense.

---

_[View the full topic](https://discourse.julialang.org/t/macros-vs-functions-with-eval-return/26247)._
