Does a script (as opposed to a module or function) introduce any scope, global or local ?
- If used with
include("myscript")I understood that no new scope is introduced as per https://docs.julialang.org/en/v1.0/base/base/#Base.include
And neither in Repl or Jupiter notebook, I believe ?
- What about with
julia myscript.jl? I guess Julia creates a new global scope in which
- (related) Is it possible to use
include("myscript")inside of a function or other constructs, or should it be only at top-level in a module/ Repl?
(I can guess the answers to all these, but I’m not 100% certain, and maybe other beginners to Julia will benefit too)