Scope/Function names and labels: Difference between revisions
m
→{{header|Julia}}
mNo edit summary |
|||
Line 437:
=={{header|Julia}}==
In Julia, there is one type of global scope, defined as the scope of the individual module (there is no global scope above module scope). User code not defined within a specific module has global scope within the predefined default module main. There are two types of local or nonglobal scope in Julia: hard local scope, which is the scope of variables defined within functions, and the "soft" local scope of variables within code structures, as quoted below from Julia's documentation:
<pre>
Type of scope | block/construct introducing this kind of scope
----------------------------------------------------------------
Global Scope | module, baremodule, at interactive prompt (REPL)
Local Scope
Local Scope
</pre>
Hard local scope means that a variable defined within a function defaults to being local to
|