# Include mystery

**URL:** <https://discourse.julialang.org/t/include-mystery/22360>\
**Category:** General Usage\
**Created:** [March 26, 2019, 4:20pm UTC](https://discourse.julialang.org/t/include-mystery/22360 "2019-03-26T16:20:11Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [March 26, 2019, 4:33pm UTC](https://discourse.julialang.org/t/include-mystery/22360/8 "2019-03-26T16:33:51Z")

</div>

> [@Is "include" safe to use inside a function?](https://discourse.julialang.org/t/is-include-safe-to-use-inside-a-function/10867):
>
> Is the following safe to do? #testinclude.jl a = 2 julia\> function f() include("testinclude.jl") return a end f (generic function with 1 method) julia\> f() 2

It has a macro for this.

---

_[View the full topic](https://discourse.julialang.org/t/include-mystery/22360)._
