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

# global_var.jl :
[
    1,
    2,
    3,
    # ...
]
global VAR = include("global_var.jl")

it work, but is it correct ?

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

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

So yes, it is correct.

1 Like