# Code organisation: Move functions to the end of the code

**URL:** <https://discourse.julialang.org/t/code-organisation-move-functions-to-the-end-of-the-code/93139>\
**Category:** New to Julia\
**Created:** [January 18, 2023, 9:14am UTC](https://discourse.julialang.org/t/code-organisation-move-functions-to-the-end-of-the-code/93139 "2023-01-18T09:14:18Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Ahmed\_Salih](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ahmed_salih/32/206579_2.png) [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Post date:** [January 19, 2023, 7:13am UTC](https://discourse.julialang.org/t/code-organisation-move-functions-to-the-end-of-the-code/93139/4 "2023-01-19T07:13:11Z")

</div>

@ceysa75 You can use Stevens solution and then try this:

> [@Is this a good way to export all variables inside of a function?](https://discourse.julialang.org/t/is-this-a-good-way-to-export-all-variables-inside-of-a-function/73699):
>
> Hello! Not a question per se, more looking for some feedback I suppose. So by googling a bit, I came around and saw that it is possible to call a macro called Base.@locals, which if you use it inside of a function, you can make it return all variables inside of the function as such: return Base.@locals I have a need for this right now (or atleast I think I do), is there something I should be aware about when using this? Kind regards

This should make it possible to develop in a script, getting the performance boost of a function and then being able to extract everything from the function easily.

Kind regards

---

_[View the full topic](https://discourse.julialang.org/t/code-organisation-move-functions-to-the-end-of-the-code/93139)._
