# How to correctly define and use global variables in the module in Julia?

**URL:** <https://discourse.julialang.org/t/how-to-correctly-define-and-use-global-variables-in-the-module-in-julia/65720>\
**Category:** General Usage\
**Created:** [August 3, 2021, 5:46am UTC](https://discourse.julialang.org/t/how-to-correctly-define-and-use-global-variables-in-the-module-in-julia/65720 "2021-08-03T05:46:29Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![genkuroki](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/genkuroki/32/18030_2.png) [@genkuroki](https://discourse.julialang.org/u/genkuroki)\
**Post date:** [August 4, 2021, 5:02am UTC](https://discourse.julialang.org/t/how-to-correctly-define-and-use-global-variables-in-the-module-in-julia/65720/11 "2021-08-04T05:02:46Z")

</div>

See [**Problem-Algorithm-Solver pattern**](https://discourse.julialang.org/t/function-depending-on-the-global-variable-inside-module/64322/10). You’ll find the answer there.

No matter how many parameters describe the problem, putting them in _one_ variable makes it easier to pass them as arguments to the function _everytime_.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-correctly-define-and-use-global-variables-in-the-module-in-julia/65720)._
