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.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Metaprogramming: prefer functions with eval or macros? | 4 | 196 | March 17, 2025 | |
| Help understanding use of macros over functions that return expressions | 1 | 379 | December 3, 2020 | |
| Why is "macro" different from "function" if everything is an expression? | 4 | 1006 | August 16, 2020 | |
| Converting symbols to types and splatting inside @eval | 10 | 913 | December 2, 2019 | |
| Problem with Macro expression evaluation | 9 | 838 | May 17, 2019 |