# Scope when using multiple modules

**URL:** <https://discourse.julialang.org/t/scope-when-using-multiple-modules/32344>\
**Category:** New to Julia\
**Created:** [December 16, 2019, 6:03pm UTC](https://discourse.julialang.org/t/scope-when-using-multiple-modules/32344 "2019-12-16T18:03:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Vasily\_Pisarev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vasily_pisarev/32/7929_2.png) [@Vasily\_Pisarev](https://discourse.julialang.org/u/Vasily_Pisarev)\
**Post date:** [December 16, 2019, 9:58pm UTC](https://discourse.julialang.org/t/scope-when-using-multiple-modules/32344/2 "2019-12-16T21:58:16Z")

</div>

When you include a file inside a module definition, all the contents of that file is loaded into the module scope. So, you have modules `Main.ModuleA.MyParams` and `Main.MyParams`, which the system considers different.

There have been discussions recently on how to organize code in such cases, you may find and try different suggestions to choose from:  
([Writing functions for types defined in another module](https://discourse.julialang.org/t/writing-functions-for-types-defined-in-another-module/31895))  
([What is the preferred way to use multiple files?](https://discourse.julialang.org/t/what-is-the-preferred-way-to-use-multiple-files/30687))

Also, please see this topic ([Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757)) for tips on formatting.

---

_[View the full topic](https://discourse.julialang.org/t/scope-when-using-multiple-modules/32344)._
