# It work, \`global VAR = include("global\_var.jl")\` but is it correct?

**URL:** <https://discourse.julialang.org/t/it-work-global-var-include-global-var-jl-but-is-it-correct/92972>\
**Category:** General Usage\
**Created:** [January 14, 2023, 10:37pm UTC](https://discourse.julialang.org/t/it-work-global-var-include-global-var-jl-but-is-it-correct/92972 "2023-01-14T22:37:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrey2185](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andrey2185/32/9889_2.png) [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Post date:** [January 14, 2023, 10:37pm UTC](https://discourse.julialang.org/t/it-work-global-var-include-global-var-jl-but-is-it-correct/92972/1 "2023-01-14T22:37:00Z")

</div>

```julia
# global_var.jl :
[
    1,
    2,
    3,
    # ...
]

```

```julia
global VAR = include("global_var.jl")

```

it work, but is it correct ?

---

<div class="post-metadata">

**Author:** ![uniment](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/uniment/32/24532_2.png) [@uniment](https://discourse.julialang.org/u/uniment)\
**Post date:** [January 15, 2023, 2:34am UTC](https://discourse.julialang.org/t/it-work-global-var-include-global-var-jl-but-is-it-correct/92972/2 "2023-01-15T02:34:58Z")

</div>

According to the docstring for `include`, which can be accessed by typing `?include` in the REPL:

```julia
Returns the result of the last evaluated expression of the input file.

```

So yes, it is correct.
